]> Sergey Matveev's repositories - nnn.git/commitdiff
Forget all history on manual dir change
authorlostd <lostd@2f30.org>
Wed, 22 Oct 2014 13:26:58 +0000 (16:26 +0300)
committerlostd <lostd@2f30.org>
Wed, 22 Oct 2014 13:30:14 +0000 (16:30 +0300)
noice.c

diff --git a/noice.c b/noice.c
index 71e4897b6881259e3277468b39bb36f5d4d097fe..f41c90aab4bc0e820c64f9727c93754b877192a2 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -676,6 +676,12 @@ nochange:
                                free(tmp);
                                free(filter);
                                filter = xstrdup(ifilter); /* Reset filter */
+                               /* Forget history */
+                               while (!SLIST_EMPTY(&histhead)) {
+                                       hist = SLIST_FIRST(&histhead);
+                                       SLIST_REMOVE_HEAD(&histhead, entry);
+                                       free(hist);
+                               }
                                DPRINTF_S(path);
                                cur = 0;
                                goto out;