diff options
-rw-r--r-- | buffer.cpp | 2 | ||||
-rw-r--r-- | client.cpp | 4 | ||||
-rw-r--r-- | jet.cpp | 2 | ||||
-rw-r--r-- | point.cpp | 1 |
4 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,5 @@ +#include "page.cpp" + struct Buffer { const char *name; Page *storage; @@ -1,3 +1,5 @@ +#include "point.cpp" + #define MAX_ARGS 16 #define pos(x, y) (x) + (y) * window_w @@ -28,7 +30,7 @@ struct Client { ArgList args; Client(const Buffer &b) : - cursor(b.storage, 0), + cursor(b), window_start(cursor), args(MAX_ARGS) {} @@ -11,8 +11,6 @@ #include <unistd.h> #include <sys/epoll.h> -#include "page.cpp" -#include "point.cpp" #include "buffer.cpp" #include "client.cpp" @@ -61,6 +61,7 @@ struct Point { Point() : page(0), index(0) {} Point(Page* page, uint16_t index) : page(page), index(index) {} + Point(const Buffer &b) : page(b.storage), index(0) {} Point(const Point &p) : page(p.page), index(p.index) {} bool operator==(Point p) { |