tAllow navigation to first and last line - ve - a minimal text editor (work in … | |
git clone git://src.adamsgaard.dk/ve | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6facf1866e50a80e078ed47197370901453d9e74 | |
parent ea5b2df1f62b662ba015d47b0a4c14e6c6ef978d | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 6 Aug 2019 15:39:53 +0200 | |
Allow navigation to first and last line | |
Diffstat: | |
M input.c | 7 +++++++ | |
1 file changed, 7 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/input.c b/input.c | |
t@@ -104,6 +104,13 @@ editor_process_keypress() | |
E.cursor_x = E.row[E.cursor_y].size; | |
break; | |
+ case 'g': | |
+ E.cursor_y = 0; | |
+ break; | |
+ case 'G': | |
+ E.cursor_y = E.num_rows - 1; | |
+ break; | |
+ | |
case 'I': | |
E.cursor_x = 0; | |
E.mode = 1; |