summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/main.c b/main.c
index b115196..325c7b2 100644
--- a/main.c
+++ b/main.c
@@ -217,6 +217,36 @@ int main(void) {
}
}
break;
+ case SDLK_HOME:
+ if (ctrl) {
+ if (shift) {
+ buffer_select_to_start_of_file(buffer);
+ } else {
+ buffer_cursor_move_to_start_of_file(buffer);
+ }
+ } else {
+ if (shift) {
+ buffer_select_to_start_of_line(buffer);
+ } else {
+ buffer_cursor_move_to_start_of_line(buffer);
+ }
+ }
+ break;
+ case SDLK_END:
+ if (ctrl) {
+ if (shift) {
+ buffer_select_to_end_of_file(buffer);
+ } else {
+ buffer_cursor_move_to_end_of_file(buffer);
+ }
+ } else {
+ if (shift) {
+ buffer_select_to_end_of_line(buffer);
+ } else {
+ buffer_cursor_move_to_end_of_line(buffer);
+ }
+ }
+ break;
}
} break;
case SDL_TEXTINPUT: {