From: lostd Date: Wed, 22 Oct 2014 13:26:58 +0000 (+0300) Subject: Forget all history on manual dir change X-Git-Tag: v1.0~92^2~176 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5aceade801f5d7c7cf44e528a9eae3ff24edfc72;p=nnn.git Forget all history on manual dir change --- diff --git a/noice.c b/noice.c index 71e4897b..f41c90aa 100644 --- 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;