From: Simon Tatham Date: Thu, 4 Jan 2024 20:23:12 +0000 (+0000) Subject: Editor: keystrokes to go to top/bottom of buffer. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=c8c82a8a8b334e50950f45f9b6fc2c82a8a5cac4;p=mastodonochrome.git Editor: keystrokes to go to top/bottom of buffer. I almost forgot about those until I caught myself doing them in real Mono today. --- diff --git a/src/editor.rs b/src/editor.rs index 94be9bd..967f7d8 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -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, _) => {