aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-12 02:46:19 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-01-12 02:46:19 +0530
commitbb3d79ce216b42cd71223860a0323c6afdd39d99 (patch)
treea00535cd66dd850c4971fe99918c28acc86e4142 /src
parent3c69e6ccac5fece5089d816de7a36fc1eb3f74e6 (diff)
downloadnnn-bb3d79ce216b42cd71223860a0323c6afdd39d99.tar.gz
Go to top when last saved filter is applied
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 55754ca..5029c80 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2143,6 +2143,9 @@ static int filterentries(char *path, char *lastname)
ln[1] = ln[REGEX_MAX - 1];
ln[REGEX_MAX - 1] = '\0';
len = mbstowcs(wln, ln, REGEX_MAX);
+ /* Go to the top, we don't know if the
+ hovered file will match the filter */
+ cur = 0;
if (matches(pln) != -1)
redraw(path);