No re-filter on MSGWAIT

This commit is contained in:
Arun Prakash Jana 2020-03-29 13:36:07 +05:30
parent 0bfc032e5d
commit e9ff65a7b5
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 16 additions and 23 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: '905' value: '900'
... ...

View File

@ -2310,8 +2310,8 @@ static int nextsel(int presel)
//DPRINTF_D(c); //DPRINTF_D(c);
//DPRINTF_S(keyname(c)); //DPRINTF_S(keyname(c));
if (c == ERR && presel == MSGWAIT) if (c == ERR)
c = (cfg.filtermode || filterset()) ? FILTER : CONTROL('L'); c = 0;
else if (c == FILTER || c == CONTROL('L')) else if (c == FILTER || c == CONTROL('L'))
/* Clear previous filter when manually starting */ /* Clear previous filter when manually starting */
clearfilter(); clearfilter();
@ -5225,8 +5225,11 @@ nochange:
} }
sel = nextsel(presel); sel = nextsel(presel);
if (presel) if (presel) {
if (presel == MSGWAIT)
statusbar(path);
presel = 0; presel = 0;
}
switch (sel) { switch (sel) {
#ifndef NOMOUSE #ifndef NOMOUSE
@ -5897,20 +5900,17 @@ nochange:
mkpath(tmp, dents[cur].name, newpath); mkpath(tmp, dents[cur].name, newpath);
xrm(newpath); xrm(newpath);
if (cfg.filtermode || filterset()) if (access(newpath, F_OK) == 0) /* File not removed */
presel = FILTER; continue;
if (access(newpath, F_OK) == 0) { /* File not removed */ if (ndents) {
copycurname();
if (!cfg.filtermode)
statusbar(path);
goto nochange;
} else if (ndents) {
cur += (cur != (ndents - 1)) ? 1 : -1; cur += (cur != (ndents - 1)) ? 1 : -1;
copycurname(); copycurname();
} else } else
lastname[0] = '\0'; lastname[0] = '\0';
if (cfg.filtermode || filterset())
presel = FILTER;
goto begin; goto begin;
} }
} }
@ -6028,12 +6028,9 @@ nochange:
if (access(newpath, F_OK) == 0) { /* File created */ if (access(newpath, F_OK) == 0) { /* File created */
xstrlcpy(lastname, tmp, NAME_MAX + 1); xstrlcpy(lastname, tmp, NAME_MAX + 1);
clearfilter(); /* Archive name may not match */ clearfilter(); /* Archive name may not match */
} else { goto begin;
if (cfg.filtermode)
presel = FILTER;
copycurname();
} }
goto begin; continue;
case SEL_OPENWITH: case SEL_OPENWITH:
/* Confirm if app is CLI or GUI */ /* Confirm if app is CLI or GUI */
r = get_input(messages[MSG_CLI_MODE]); r = get_input(messages[MSG_CLI_MODE]);
@ -6219,12 +6216,8 @@ nochange:
break; break;
case SEL_LAUNCH: case SEL_LAUNCH:
launch_app(path, newpath); launch_app(path, newpath);
r = FALSE;
if (cfg.filtermode) break;
presel = FILTER;
if (ndents)
copycurname();
goto nochange;
default: /* SEL_RUNCMD */ default: /* SEL_RUNCMD */
r = TRUE; r = TRUE;
#ifndef NORL #ifndef NORL