src/nnn.c | 3 ++- diff --git a/src/nnn.c b/src/nnn.c index 4be553acb56354f54a880acaccde1ee190b29bb8..36e2c30d0b769f8518a025c7428e5d33f5788b08 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2843,7 +2843,8 @@ } else if (ln[REGEX_MAX - 1]) { /* Show the previous filter */ ln[1] = ln[REGEX_MAX - 1]; ln[REGEX_MAX - 1] = '\0'; len = mbstowcs(wln, ln, REGEX_MAX); - } + } else + goto end; } /* Go to the top, we don't know if the hovered file will match the filter */