mirror of
https://github.com/jarun/nnn.git
synced 2025-02-26 03:01:32 +00:00
Forward filtering optimization
This commit is contained in:
parent
bf36462a2b
commit
ca3b27daf2
1 changed files with 6 additions and 1 deletions
7
nnn.c
7
nnn.c
|
@ -1158,7 +1158,12 @@ filterentries(char *path)
|
||||||
wln[len] = (wchar_t)*ch;
|
wln[len] = (wchar_t)*ch;
|
||||||
wln[++len] = '\0';
|
wln[++len] = '\0';
|
||||||
wcstombs(ln, wln, REGEX_MAX);
|
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)
|
if (matches(pln) == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue