nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 4b8bd27d08a948f6ad266bda4951a9abcee77c88
parent 757f558f3bd7cc5c0c543452cd69e09fb9825d53
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 16 Dec 2018 09:34:08 +0100

bindings: change the action of <Alt+Up>/<Alt+Down> 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.)

Diffstat:
Msrc/global.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 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);