nano-devel
[Top][All Lists]
Advanced

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

[Nano-devel] [PATCH] bindings: show ^/ instead of ^_ for Goto Line


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH] bindings: show ^/ instead of ^_ for Goto Line
Date: Mon, 19 Feb 2018 20:23:07 +0100

The slash is easier to read than the underscore (which almost
disappears at the bottom of the screen), and easier to type
(no Shift needed on a US keyboard), and it kind of harmonizes
with the ^\ for Replace and the M-/ for end-of-buffer.
---
 src/global.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/global.c b/src/global.c
index 041b09c2..87acd2d0 100644
--- a/src/global.c
+++ b/src/global.c
@@ -446,6 +446,8 @@ int keycode_from_string(const char *keystring)
        if (keystring[0] == '^') {
                if (strcasecmp(keystring, "^Space") == 0)
                        return 0;
+               if (strcasecmp(keystring, "^/") == 0)
+                       return '_' - 64;
                if (strlen(keystring) == 2)
                        return keystring[1] - 64;
                else
@@ -1120,7 +1122,7 @@ void shortcut_init(void)
 #endif
        add_to_sclist(MMAIN, "^C", 0, do_cursorpos_void, 0);
        add_to_sclist(MMAIN, "F11", 0, do_cursorpos_void, 0);
-       add_to_sclist(MMAIN, "^_", 0, do_gotolinecolumn_void, 0);
+       add_to_sclist(MMAIN, "^/", 0, do_gotolinecolumn_void, 0);
        add_to_sclist(MMAIN, "M-G", 0, do_gotolinecolumn_void, 0);
        add_to_sclist(MMAIN, "F13", 0, do_gotolinecolumn_void, 0);
        add_to_sclist(MMAIN|MHELP|MBROWSER|MLINTER, "^Y", 0, do_page_up, 0);
-- 
2.14.3




reply via email to

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