aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-09 09:51:29 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-09 09:54:03 +0530
commitda661987aa064ca37dc557b37ff60991684ba514 (patch)
tree523e0ee58251da4105ff93b019da1727f6d09d96
parente8eeff9b3dd30121e63991e99c844ec4002831e2 (diff)
downloadnnn-da661987aa064ca37dc557b37ff60991684ba514.tar.gz
key 'q' at key prompt quits context
-rw-r--r--README.md1
-rw-r--r--nnn.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index d78fe0e..42cd939 100644
--- 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 688215d..8e5cabf 100644
--- a/nnn.c
+++ b/nnn.c
@@ -2807,6 +2807,9 @@ nochange:
if (cfg.filtermode)
presel = FILTER;
goto begin;
+ case 'q':
+ presel = 'q';
+ goto nochange;
}
}