aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar lostd <lostd@2f30.org>2014-10-10 09:50:46 +0300
committerGravatar lostd <lostd@2f30.org>2014-10-10 09:50:46 +0300
commita75021c2d2ba1f23a110c5bfd795ef74e324e321 (patch)
tree0f9fd646a2bbf1540fbf43f50f836d763bb27a9d
parentb0df3806deb4ae5c6eb01f7d6b71a50ca16610b7 (diff)
downloadnnn-a75021c2d2ba1f23a110c5bfd795ef74e324e321.tar.gz
Reset to initial filter on directory change
-rw-r--r--noice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/noice.c b/noice.c
index 2760e77..1ac3279 100644
--- a/noice.c
+++ b/noice.c
@@ -450,6 +450,8 @@ nochange:
strlcpy(tmp, dir, strlen(dir) + 1);
free(path);
path = tmp;
+ free(filter);
+ filter = strdup(ifilter); /* Reset filter */
goto out;
}
}
@@ -490,6 +492,8 @@ nochange:
if (S_ISDIR(sb.st_mode)) {
free(path);
path = pathnew;
+ free(filter);
+ filter = strdup(ifilter); /* Reset filter */
goto out;
}
/* Regular file */
@@ -538,6 +542,7 @@ nochange:
printmsg("");
goto nochange;
}
+ free(filter);
filter = tmp;
filter_re = re;
DPRINTF_S(filter);