diff options
Diffstat (limited to 'src/client/cursor.cpp')
-rw-r--r-- | src/client/cursor.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/cursor.cpp b/src/client/cursor.cpp index 65e32bf..82548b1 100644 --- a/src/client/cursor.cpp +++ b/src/client/cursor.cpp @@ -32,9 +32,21 @@ struct Cursor { } void move_up() { + if (y != 0) { + y--; + if (x > w.line_ends[y]) { + x = w.line_ends[y]; + } + } } void move_down() { + if (element()) { + y++; + if (x > w.line_ends[y]) { + x = w.line_ends[y]; + } + } } void update() { |