diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-29 20:36:16 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-29 20:36:16 -0500 |
commit | 51837743b0f90973bf63582a8f34662e9677629e (patch) | |
tree | fee7d2dd0b3be97c2ff678b56e5564549b6ca7fd /main.c | |
parent | ad9dfcbc8542fa478d9afbfb13a953b6da8186c7 (diff) |
Home and end
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -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: { |