mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Reset to initial filter on directory change
This commit is contained in:
parent
b0df3806de
commit
a75021c2d2
5
noice.c
5
noice.c
|
@ -450,6 +450,8 @@ nochange:
|
||||||
strlcpy(tmp, dir, strlen(dir) + 1);
|
strlcpy(tmp, dir, strlen(dir) + 1);
|
||||||
free(path);
|
free(path);
|
||||||
path = tmp;
|
path = tmp;
|
||||||
|
free(filter);
|
||||||
|
filter = strdup(ifilter); /* Reset filter */
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,6 +492,8 @@ nochange:
|
||||||
if (S_ISDIR(sb.st_mode)) {
|
if (S_ISDIR(sb.st_mode)) {
|
||||||
free(path);
|
free(path);
|
||||||
path = pathnew;
|
path = pathnew;
|
||||||
|
free(filter);
|
||||||
|
filter = strdup(ifilter); /* Reset filter */
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Regular file */
|
/* Regular file */
|
||||||
|
@ -538,6 +542,7 @@ nochange:
|
||||||
printmsg("");
|
printmsg("");
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
free(filter);
|
||||||
filter = tmp;
|
filter = tmp;
|
||||||
filter_re = re;
|
filter_re = re;
|
||||||
DPRINTF_S(filter);
|
DPRINTF_S(filter);
|
||||||
|
|
Loading…
Reference in a new issue