aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-06 03:08:46 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-01-06 03:08:46 +0530
commit72e305759e66cbd6d7e6aa139e93ff5980c66cad (patch)
tree8668cc86df0503dd09137f5db253e76a7ff8957f
parentef9e45682ec355c95027f0933092e6bd3d617a5a (diff)
downloadnnn-72e305759e66cbd6d7e6aa139e93ff5980c66cad.tar.gz
Don't lose filename on second escape
-rw-r--r--src/nnn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a0c956b..a55f666 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1259,7 +1259,8 @@ static int filterentries(char *path)
printprompt(ln);
continue;
case 27: /* Exit filter mode on Escape */
- cur = oldcur;
+ if (len == 1)
+ cur = oldcur;
*ch = CONTROL('L');
goto end;
}