chiark / gitweb /
Editor: keystrokes to go to top/bottom of buffer.
authorSimon Tatham <anakin@pobox.com>
Thu, 4 Jan 2024 20:23:12 +0000 (20:23 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 4 Jan 2024 20:23:12 +0000 (20:23 +0000)
I almost forgot about those until I caught myself doing them in real
Mono today.

src/editor.rs

index 94be9bdb42e153aa6d87f83b63ee407cc715fe2e..967f7d89594f6ba3233e37020b27cdbc273ca413 100644 (file)
@@ -1468,6 +1468,14 @@ impl ActivityState for Composer {
                 self.keystate = CtrlO;
                 return LogicalAction::Nothing; // no need to post_update
             }
+            (CtrlO, Ctrl('P')) | (CtrlO, Up) => {
+                self.core.beginning_of_buffer();
+                self.keystate = Start;
+            }
+            (CtrlO, Ctrl('N')) | (CtrlO, Down) => {
+                self.core.end_of_buffer();
+                self.keystate = Start;
+            }
             (CtrlO, Pr('q')) | (CtrlO, Pr('Q')) => return LogicalAction::Pop,
             (CtrlO, Space) => return self.submit_post(),
             (CtrlO, _) => {