tweaks: fold two cases together, because they basically do the same

This commit is contained in:
Benno Schulenberg 2022-08-21 12:49:52 +02:00
parent b561c386c3
commit 2c5459a1b7

View File

@ -514,16 +514,11 @@ char *browse(char *path)
#endif #endif
function = interpret(kbinput); function = interpret(kbinput);
if (function == full_refresh) { if (function == full_refresh || function == do_help) {
full_refresh(); 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,
kbinput = KEY_WINCH; * or because the terminal dimensions might have changed. */
#endif
} else if (function == do_help) {
do_help();
#ifndef NANO_TINY
/* The terminal dimensions might have changed, so act as if. */
kbinput = KEY_WINCH; kbinput = KEY_WINCH;
} else if (function == do_toggle && get_shortcut(kbinput)->toggle == NO_HELP) { } else if (function == do_toggle && get_shortcut(kbinput)->toggle == NO_HELP) {
TOGGLE(NO_HELP); TOGGLE(NO_HELP);