]> Sergey Matveev's repositories - nnn.git/commitdiff
Support more sepecial keys at empty prompt in nav-as-you-type
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 27 Feb 2020 03:17:00 +0000 (08:47 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 27 Feb 2020 03:17:00 +0000 (08:47 +0530)
src/nnn.c

index 2444f97b143605c6727b2113a41c1f6905e185c2..bfb6568a0da4d3ce937cc323171a8ee5fa2fd220 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2497,14 +2497,24 @@ static int filterentries(char *path, char *lastname)
                        goto end;
 
                if (len == 1) {
-                       switch (*ch) {
-                       case '=': // fallthrough /* Launch app */
-                       case ']': // fallthorugh /* Prompt key */
-                       case ';': // fallthrough /* Run plugin key */
-                       case ',': // fallthrough /* Pin CWD */
-                       case '~': // fallthrough /* Go HOME */
-                       case '?': /* Help and config key, '?' is an invalid regex */
+                       if (*ch == '?') /* Help and config key, '?' is an invalid regex */
                                goto end;
+
+                       if (cfg.filtermode) {
+                               switch (*ch) {
+                               case '\'': // fallthrough /* Go to first non-dir file */
+                               case '+': // fallthrough /* Toggle proceed on open */
+                               case ',': // fallthrough /* Pin CWD */
+                               case '-': // fallthrough /* Visit last visited dir */
+                               case '.': // fallthrough /* Show hidden files */
+                               case ';': // fallthrough /* Run plugin key */
+                               case '=': // fallthrough /* Launch app */
+                               case '@': // fallthrough /* Visit start dir */
+                               case ']': // fallthorugh /* Prompt key */
+                               case '`': // fallthrough /* Visit / */
+                               case '~': /* Go HOME */
+                                       goto end;
+                               }
                        }
 
                        /* Toggle case-sensitivity */