mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Reduce the number of redundant checks
This commit is contained in:
parent
2390ac7b74
commit
897f01c2c3
14
src/nnn.c
14
src/nnn.c
|
@ -4972,6 +4972,13 @@ begin:
|
|||
|
||||
while (1) {
|
||||
redraw(path);
|
||||
|
||||
/* Display a one-time message */
|
||||
if (g_listpath && (g_states & STATE_MSG)) {
|
||||
g_states &= ~STATE_MSG;
|
||||
printwait(messages[MSG_IGNORED], &presel);
|
||||
}
|
||||
|
||||
nochange:
|
||||
/* Exit if parent has exited */
|
||||
if (getppid() == 1) {
|
||||
|
@ -4989,13 +4996,6 @@ nochange:
|
|||
return _FAILURE;
|
||||
}
|
||||
|
||||
/* Display a one-time message */
|
||||
if (g_states & STATE_MSG) {
|
||||
g_states &= ~STATE_MSG;
|
||||
printwait(messages[MSG_IGNORED], &presel);
|
||||
goto nochange;
|
||||
}
|
||||
|
||||
sel = nextsel(presel);
|
||||
if (presel)
|
||||
presel = 0;
|
||||
|
|
Loading…
Reference in a new issue