Revert "Fix clang error"

This reverts commit 78de6b5752.
This commit is contained in:
Arun Prakash Jana 2019-04-21 15:41:26 +05:30
parent b059e08f3a
commit 7133971052
1 changed files with 19 additions and 10 deletions

View File

@ -459,7 +459,7 @@ static struct timespec gtimeout;
#define clearprompt() printmsg("")
#define printwarn() printmsg(strerror(errno))
#define istopdir(path) ((path)[1] == '\0' && (path)[0] == '/')
#define copycurname() if (ndents) xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1)
#define copycurname() xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1)
#define settimeout() timeout(1000)
#define cleartimeout() timeout(-1)
#define errexit() printerr(__LINE__)
@ -3299,6 +3299,7 @@ nochange:
presel = filterentries(path);
/* Save current */
if (ndents)
copycurname();
if (presel == 27) {
@ -3388,6 +3389,7 @@ nochange:
}
/* Save current */
if (ndents)
copycurname();
goto begin;
case SEL_STATS:
@ -3432,6 +3434,7 @@ nochange:
r = handle_archive(newpath, "-x", path);
break;
case SEL_REDRAW:
if (ndents)
copycurname();
goto begin;
case SEL_RENAMEALL:
@ -3478,6 +3481,7 @@ nochange:
presel = FILTER;
/* Save current */
if (ndents)
copycurname();
/* Repopulate as directory content may have changed */
@ -3623,6 +3627,7 @@ nochange:
spawn("sh", "-c", g_buf, path, F_NORMAL);
if (ndents)
copycurname();
if (cfg.filtermode)
presel = FILTER;
@ -3787,6 +3792,7 @@ nochange:
if (cfg.filtermode)
presel = FILTER;
if (ndents)
copycurname();
goto begin;
} else {
@ -3926,6 +3932,7 @@ nochange:
presel = FILTER;
/* Save current */
if (ndents)
copycurname();
/* Repopulate as directory content may have changed */
@ -4002,6 +4009,7 @@ nochange:
if (xlines != LINES || xcols != COLS) {
idle = 0;
setdirwatch();
if (ndents)
copycurname();
goto begin;
}
@ -4010,6 +4018,7 @@ nochange:
if (idletimeout && idle == idletimeout) {
idle = 0;
spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL);
if (ndents)
copycurname();
goto begin;
}