]> Sergey Matveev's repositories - nnn.git/commitdiff
Retain filter in filter mode when opening files
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 5 May 2021 07:39:54 +0000 (13:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 5 May 2021 07:39:54 +0000 (13:09 +0530)
src/.clang-tidy
src/nnn.c

index 6a8141ab15af697053758be8c456fab3acb9694c..a3d12927c5d631bbd6b7d1e2a69e89c93ac39563 100644 (file)
@@ -11,5 +11,5 @@ CheckOptions:
   - key:             fuchsia-restrict-system-includes.Includes
     value:           '*,-stdint.h,-stdbool.h'
   - key:             readability-function-size.StatementThreshold
-    value:           '900'
+    value:           '925'
 ...
index 2fb003453154927af8d1c5753aab8092b3a968f9..6d0b828d5a5bb21809b1b73fdc447d4b1d582a52 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6287,10 +6287,14 @@ nochange:
 #endif
                        ) {
                                spawn(editor, newpath, NULL, F_CLI);
+                               if (cfg.filtermode) {
+                                       presel = FILTER;
+                                       clearfilter();
+                               }
                                continue;
                        }
 
-                       /* Get the extension for regext match */
+                       /* Get the extension for regex match */
                        tmp = xextension(pent->name, pent->nlen - 1);
 #ifdef PCRE
                        if (tmp && !pcre_exec(archive_pcre, NULL, tmp,
@@ -6338,6 +6342,10 @@ nochange:
                        /* Move cursor to the next entry if not the last entry */
                        if (g_state.autonext && cur != ndents - 1)
                                move_cursor((cur + 1) % ndents, 0);
+                       if (cfg.filtermode) {
+                               presel = FILTER;
+                               clearfilter();
+                       }
                        continue;
                case SEL_NEXT: // fallthrough
                case SEL_PREV: // fallthrough