From: Arun Prakash Jana Date: Thu, 15 Jul 2021 20:50:28 +0000 (+0530) Subject: Ignore filter key if no results X-Git-Tag: v4.2~19 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3ef50f06f86a962b465d50b7ffb6909436b69685;p=nnn.git Ignore filter key if no results --- 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; }