From 3ef50f06f86a962b465d50b7ffb6909436b69685 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 16 Jul 2021 02:20:28 +0530 Subject: [PATCH] Ignore filter key if no results --- src/nnn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 3d866bf4..1ab79d20 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3321,9 +3321,9 @@ static int filterentries(char *path, char *lastname) * - new matches can only be a subset of current matches. */ /* ndents = total; */ - - if (matches(pln) == -1) { - showfilter(ln); + r = matches(pln); + if (r <= 0) { + !r ? unget_wch(KEY_BACKSPACE) : showfilter(ln); continue; } -- 2.48.1