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
function = interpret(kbinput);
if (function == full_refresh || function == do_help) {
if (function == do_help || function == full_refresh) {
function();
#ifndef NANO_TINY
/* Simulate a terminal resize to force a directory reread,

View File

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