commit 37c8232f4dbe13928aeb2239d2112451728e0d62
parent f13dd140ebefb360c18bc9e611fb1978db4048ba
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 10 Dec 2018 11:09:36 +0100
bindings: provide usable shortcuts for prevword/nextword in tiny version
In the tiny version the feature toggles are absent, so most of the
Meta-key combinations do nothing, and when --with-slang was used, the
<Ctrl+Left/Right> keystrokes do not work (as they produce truncated
escape sequences under Slang), and the <Ctrl+Space> and <Alt+Space>
keystrokes are awkward to type and make no sense. So... use some
of the free Meta combinations to jump a word to the left or right,
since these functions *are* present in the tiny version.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/global.c b/src/global.c
@@ -1180,6 +1180,12 @@ void shortcut_init(void)
add_to_sclist(MSOME, "^Left", CONTROL_LEFT, do_prev_word_void, 0);
add_to_sclist(MSOME, "^Right", CONTROL_RIGHT, do_next_word_void, 0);
}
+#ifdef NANO_TINY
+ add_to_sclist(MMAIN, "M-B", 0, do_prev_word_void, 0);
+ add_to_sclist(MMAIN, "M-D", 0, do_prev_word_void, 0);
+ add_to_sclist(MMAIN, "M-F", 0, do_next_word_void, 0);
+ add_to_sclist(MMAIN, "M-N", 0, do_next_word_void, 0);
+#endif
add_to_sclist(MMOST|MBROWSER, "M-Space", 0, do_prev_word_void, 0);
add_to_sclist(MMOST|MBROWSER, "^Space", 0, do_next_word_void, 0);
add_to_sclist(MMOST, "^A", 0, do_home, 0);