From 2c5459a1b7cd20bfed1ea9b07fb85247552f1829 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 21 Aug 2022 12:49:52 +0200 Subject: [PATCH] tweaks: fold two cases together, because they basically do the same --- src/browser.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/browser.c b/src/browser.c index 0f7b1f65..e633592a 100644 --- a/src/browser.c +++ b/src/browser.c @@ -514,16 +514,11 @@ char *browse(char *path) #endif function = interpret(kbinput); - if (function == full_refresh) { - full_refresh(); + if (function == full_refresh || function == do_help) { + function(); #ifndef NANO_TINY - /* Simulate a terminal resize to force a directory reread. */ - kbinput = KEY_WINCH; -#endif - } else if (function == do_help) { - do_help(); -#ifndef NANO_TINY - /* The terminal dimensions might have changed, so act as if. */ + /* Simulate a terminal resize to force a directory reread, + * or because the terminal dimensions might have changed. */ kbinput = KEY_WINCH; } else if (function == do_toggle && get_shortcut(kbinput)->toggle == NO_HELP) { TOGGLE(NO_HELP);