]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix filterfn not in sync with cfg.regex
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 23 May 2020 20:21:59 +0000 (01:51 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 23 May 2020 20:21:59 +0000 (01:51 +0530)
src/nnn.c

index b45eeb2302dfc8784091d6d3e295f46b685d41dd..942b7db87ac6bc3c8641cd0ba81df2e5155d9583 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2638,7 +2638,7 @@ static int filterentries(char *path, char *lastname)
                                ln[0] = (ln[0] == FILTER) ? RFILTER : FILTER;
                                wln[0] = (uchar)ln[0];
                                cfg.regex ^= 1;
-                               filterfn = (filterfn == &visible_str) ? &visible_re : &visible_str;
+                               filterfn = cfg.regex ? &visible_re : &visible_str;
                                showfilter(ln);
                                continue;
                        }