]> Sergey Matveev's repositories - nnn.git/commitdiff
key 'q' at key prompt quits context
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 9 Nov 2018 04:21:29 +0000 (09:51 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 9 Nov 2018 04:24:03 +0000 (09:54 +0530)
README.md
nnn.c

index d78fe0e573df4c1275197fd9ea07cbd9f61c3c4e..42cd9390da9c73fb5164a61af96a8cac76116618 100644 (file)
--- a/README.md
+++ b/README.md
@@ -273,6 +273,7 @@ The key prompt, invoked by <kbd>^B</kbd>, provides a powerful multi-functional n
 | <kbd>~</kbd> | Go to HOME directory |
 | <kbd>-</kbd> | Go to last visited directory |
 | <kbd>&</kbd> | Go to start directory |
+| <kbd>q</kbd> | Quit context |
 
 If all the configured bookmark keys are single character, the prompt is not shown and <kbd>Enter</kbd> is not required; just press <kbd>^B</kbd> followed by the key.
 
diff --git a/nnn.c b/nnn.c
index 688215d99c687351a89a7c315cc43574c1287331..8e5cabf9363b6024ccca30d3e931240336d6b7f3 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -2807,6 +2807,9 @@ nochange:
                                        if (cfg.filtermode)
                                                presel = FILTER;
                                        goto begin;
+                               case 'q':
+                                       presel = 'q';
+                                       goto nochange;
                                }
                        }