nnn.c | 7 ++++++- diff --git a/nnn.c b/nnn.c index 5975040480df1bde6e5829e5a792a8f847aa22de..4d69047a678301dab0767400f65ae829c2ba3ddc 100644 --- a/nnn.c +++ b/nnn.c @@ -1158,7 +1158,12 @@ wln[len] = (wchar_t)*ch; wln[++len] = '\0'; wcstombs(ln, wln, REGEX_MAX); - ndents = total; + + /* Forward-filtering optimization: + * - new matches can only be a subset of current matches. + */ + /* ndents = total; */ + if (matches(pln) == -1) continue;