nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] bindings: change the hard-bind of <Alt+Up/Down> to


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] bindings: change the hard-bind of <Alt+Up/Down> to scrolling per line
Date: Mon, 7 Jan 2019 20:21:08 +0100

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.
---
 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);
-- 
2.19.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]