summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-11-29 18:45:10 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-11-29 18:45:10 -0500
commitc4fdc35b3b21faecda42e434b28e4fb6db39d3e6 (patch)
treecdaa3410f3c3b8303a959e0d1fe31a4a3f00ef6b /main.c
parent0826ab93914b508f9a37edf6bd4307bb0ecea14c (diff)
moving around the cursor
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index de72bbd..5c085fc 100644
--- a/main.c
+++ b/main.c
@@ -104,6 +104,12 @@ int main(void) {
case SDLK_PAGEDOWN:
buffer_scroll(&text_buffer, 0, +buffer_display_rows(&text_buffer));
break;
+ case SDLK_RIGHT:
+ buffer_cursor_move_right(&text_buffer);
+ break;
+ case SDLK_LEFT:
+ buffer_cursor_move_left(&text_buffer);
+ break;
}
} break;
}