src/nnn.c | 6 +++--- diff --git a/src/nnn.c b/src/nnn.c index 3d866bf480f599dad44f4b020f5a9b1eec7804a8..1ab79d201f6abeb83ab54dc68380a2576b136e1f 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3321,9 +3321,9 @@ /* Forward-filtering optimization: * - 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; }