aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nnn.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 133660d..4b27a2e 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2024,12 +2024,10 @@ static int nextsel(int presel)
//DPRINTF_D(c);
//DPRINTF_S(keyname(c));
- /* Clear previous filter when manually starting */
- if (c == FILTER)
- clearfilter();
-
- if (presel == MSGWAIT)
+ if (c == ERR && presel == MSGWAIT)
c = (cfg.filtermode) ? FILTER : CONTROL('L');
+ else if (c == FILTER) /* Clear previous filter when manually starting */
+ clearfilter();
}
if (c == -1) {