From: Arun Prakash Jana Date: Sat, 11 Jan 2020 21:16:19 +0000 (+0530) Subject: Go to top when last saved filter is applied X-Git-Tag: v2.9~40 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=bb3d79ce216b42cd71223860a0323c6afdd39d99;p=nnn.git Go to top when last saved filter is applied --- diff --git a/plugins/README.md b/plugins/README.md index d850e545..853c5d7b 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -65,7 +65,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. ## Ways to invoke a plugin -1. Execute directly with ;key or xkey: +1. Fire directly with ;key or ^Fkey: export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;n:notes;v:imgviu;t:imgthumb' diff --git a/src/nnn.c b/src/nnn.c index 55754ca9..5029c807 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);