tweaks: reshuffle a seldom-used function to the end of an if-else series

This commit is contained in:
Benno Schulenberg 2024-07-22 12:03:04 +02:00
parent c5a0e6b60c
commit 572247dbd8
2 changed files with 5 additions and 5 deletions

View File

@ -493,7 +493,7 @@ char *browse(char *path)
#endif #endif
function = interpret(kbinput); function = interpret(kbinput);
if (function == full_refresh || function == do_help) { if (function == do_help || function == full_refresh) {
function(); function();
#ifndef NANO_TINY #ifndef NANO_TINY
/* Simulate a terminal resize to force a directory reread, /* Simulate a terminal resize to force a directory reread,

View File

@ -486,10 +486,8 @@ void show_help(void)
#endif #endif
function = interpret(kbinput); function = interpret(kbinput);
if (function == full_refresh) { if (ISSET(SHOW_CURSOR) && (function == do_left || function == do_right ||
full_refresh(); function == do_up || function == do_down)) {
} else if (ISSET(SHOW_CURSOR) && (function == do_left || function == do_right ||
function == do_up || function == do_down)) {
function(); function();
} else if (function == do_up || function == do_scroll_up) { } else if (function == do_up || function == do_scroll_up) {
do_scroll_up(); do_scroll_up();
@ -516,6 +514,8 @@ void show_help(void)
} else if (kbinput == THE_WINDOW_RESIZED) { } else if (kbinput == THE_WINDOW_RESIZED) {
; /* Nothing to do. */ ; /* Nothing to do. */
#endif #endif
} else if (function == full_refresh) {
full_refresh();
} else if (function == do_exit) { } else if (function == do_exit) {
break; break;
} else } else