]> Sergey Matveev's repositories - nnn.git/commitdiff
Go to top when last saved filter is applied
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jan 2020 21:16:19 +0000 (02:46 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jan 2020 21:16:19 +0000 (02:46 +0530)
plugins/README.md
src/nnn.c

index d850e5457867b44bb5b221463df8ce61c199f00f..853c5d7ba5fe226f8e9acaf67726fd54deb61fc8 100644 (file)
@@ -65,7 +65,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`.
 
 ## Ways to invoke a plugin
 
-1. Execute directly with <kbd>;key</kbd> or <kbd>xkey</kbd>:
+1. Fire directly with <kbd>;key</kbd> or <kbd>^Fkey</kbd>:
 
        export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;n:notes;v:imgviu;t:imgthumb'
 
index 55754ca9228f331e13003407688563fc0dc5ff16..5029c807393d74e61e9da1083ac5fd252f9b4c0d 100644 (file)
--- 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);