From 37c8232f4dbe13928aeb2239d2112451728e0d62 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 10 Dec 2018 11:09:36 +0100 Subject: [PATCH] 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 keystrokes do not work (as they produce truncated escape sequences under Slang), and the and 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. --- src/global.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/global.c b/src/global.c index 5d057401..f37cc179 100644 --- 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);