aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}