]> Sergey Matveev's repositories - nnn.git/commitdiff
Range selection: replace ^K by ^Space
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 24 Sep 2020 12:02:49 +0000 (17:32 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 24 Sep 2020 12:02:49 +0000 (17:32 +0530)
src/nnn.c
src/nnn.h

index 050aa11aaf28360eb47f96cc40b0e3f50eed747c..127818d7af05207a23a0b94ba65b109633e36076 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2857,8 +2857,11 @@ static int filterentries(char *path, char *lastname)
                        break;
 
                /* Handle all control chars in main loop */
-               if (*ch < ASCII_MAX && keyname(*ch)[0] == '^' && *ch != '^')
+               if (*ch < ASCII_MAX && keyname(*ch)[0] == '^' && *ch != '^') {
+                       if (keyname(*ch)[1] == '@')
+                               *ch = 'm';
                        goto end;
+               }
 
                if (len == 1) {
                        if (*ch == '?') /* Help and config key, '?' is an invalid regex */
@@ -4576,7 +4579,7 @@ static void show_help(const char *path)
                 "b^R  Rename/dup%-14cr  Batch rename\n"
                  "cz  Archive%-17ce  Edit file\n"
                  "c*  Toggle exe%-14c>  Export list\n"
-          "5Space ^J  (Un)select%-11cm ^K  Mark range/clear\n"
+          "5Space ^J  (Un)select%-7cm ^Space  Mark range/clear\n"
               "9p ^P  Copy sel here%-11ca  Select all\n"
               "9v ^V  Move sel here%-8cw ^W  Cp/mv sel as\n"
               "9x ^X  Delete%-18cE  Edit sel\n"
index 5b8efa1c537715ac268d5d60bdbb4b5cd6291c64..f53981f22aeeb626d58179e5da1566c96cac3df4 100644 (file)
--- a/src/nnn.h
+++ b/src/nnn.h
@@ -215,7 +215,7 @@ static struct key bindings[] = {
        { ' ',            SEL_SEL },
        /* Toggle select multiple files */
        { 'm',            SEL_SELMUL },
-       { CONTROL('K'),   SEL_SELMUL },
+       { CONTROL(' '),   SEL_SELMUL },
        /* Select all files in current dir */
        { 'a',            SEL_SELALL },
        /* List, edit selection */