From 4b8bd27d08a948f6ad266bda4951a9abcee77c88 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 16 Dec 2018 09:34:08 +0100 Subject: [PATCH] bindings: change the action of / to 'scroll linewise' Using the cursor keys for movement-related functions makes more sense than using them for jumping to the previous or next occurrence of the search string. (For searching another occurrence backward the M-Q binding has become available, while M-W will search another occurrence always forward.) --- src/global.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/global.c b/src/global.c index 0368132f..10d1f4af 100644 --- a/src/global.c +++ b/src/global.c @@ -1166,8 +1166,6 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-\xE2\x97\x80", ALT_LEFT, switch_to_prev_buffer, 0); add_to_sclist(MMAIN, "M-\xE2\x96\xb6", ALT_RIGHT, switch_to_next_buffer, 0); #endif - add_to_sclist(MMAIN|MHELP|MBROWSER, "M-\xE2\x96\xb2", ALT_UP, do_findprevious, 0); - add_to_sclist(MMAIN|MHELP|MBROWSER, "M-\xE2\x96\xbc", ALT_DOWN, do_findnext, 0); #endif } else #endif @@ -1208,6 +1206,12 @@ void shortcut_init(void) add_to_sclist(MMAIN, "M-0", 0, do_para_end_void, 0); #endif #if !defined(NANO_TINY) || defined(ENABLE_HELP) +#ifdef ENABLE_UTF8 + if (using_utf8()) { + add_to_sclist(MMAIN|MHELP, "M-\xE2\x96\xb2", ALT_UP, do_scroll_up, 0); + add_to_sclist(MMAIN|MHELP, "M-\xE2\x96\xbc", ALT_DOWN, do_scroll_down, 0); + } +#endif add_to_sclist(MMAIN|MHELP, "M--", 0, do_scroll_up, 0); add_to_sclist(MMAIN|MHELP, "M-_", 0, do_scroll_up, 0); add_to_sclist(MMAIN|MHELP, "M-+", 0, do_scroll_down, 0);