aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-25 02:21:22 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-25 02:21:22 +0530
commitd065666205f96cf66c2de6d7b307e68ed97bd774 (patch)
tree797802a7110c191bfbec37404091b3e6680dee65 /src
parentafd8b64d563efa4b228694616614090a3b4bedba (diff)
downloadnnn-d065666205f96cf66c2de6d7b307e68ed97bd774.tar.gz
Use ^G to discard seleciton and exit in vim plugin mode
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a20dfe7..f763a5e 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3343,6 +3343,13 @@ nochange:
break;
if (sel == SEL_CDQUIT) {
+ /* In vim picker mode, clear selection and exit */
+ if (cfg.picker) {
+ copybufpos = 0;
+ dentfree(dents);
+ return;
+ }
+
tmp = getenv("NNN_TMPFILE");
if (!tmp) {
printmsg("set NNN_TMPFILE");