Retain filter in filter mode when opening files

This commit is contained in:
Arun Prakash Jana 2021-05-05 13:09:54 +05:30
parent bd47846185
commit 0eeae6ee7b
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 10 additions and 2 deletions

View file

@ -11,5 +11,5 @@ CheckOptions:
- key: fuchsia-restrict-system-includes.Includes - key: fuchsia-restrict-system-includes.Includes
value: '*,-stdint.h,-stdbool.h' value: '*,-stdint.h,-stdbool.h'
- key: readability-function-size.StatementThreshold - key: readability-function-size.StatementThreshold
value: '900' value: '925'
... ...

View file

@ -6287,10 +6287,14 @@ nochange:
#endif #endif
) { ) {
spawn(editor, newpath, NULL, F_CLI); spawn(editor, newpath, NULL, F_CLI);
if (cfg.filtermode) {
presel = FILTER;
clearfilter();
}
continue; continue;
} }
/* Get the extension for regext match */ /* Get the extension for regex match */
tmp = xextension(pent->name, pent->nlen - 1); tmp = xextension(pent->name, pent->nlen - 1);
#ifdef PCRE #ifdef PCRE
if (tmp && !pcre_exec(archive_pcre, NULL, tmp, if (tmp && !pcre_exec(archive_pcre, NULL, tmp,
@ -6338,6 +6342,10 @@ nochange:
/* Move cursor to the next entry if not the last entry */ /* Move cursor to the next entry if not the last entry */
if (g_state.autonext && cur != ndents - 1) if (g_state.autonext && cur != ndents - 1)
move_cursor((cur + 1) % ndents, 0); move_cursor((cur + 1) % ndents, 0);
if (cfg.filtermode) {
presel = FILTER;
clearfilter();
}
continue; continue;
case SEL_NEXT: // fallthrough case SEL_NEXT: // fallthrough
case SEL_PREV: // fallthrough case SEL_PREV: // fallthrough