commit 2cd21da4f0409122395653b6db7a408ea9fdb03b
parent 681f0423261b75c87cb8eecf337be00f29cb78a3
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 15 May 2016 11:17:55 +0200
tweaks: remove the fiddling with an unrelated setting
CONST_UPDATE is only relevant when in the main menu, not when in the
browser. So, check for that condition, instead of saving, changing,
and then restoring the setting.
Diffstat:
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/browser.c b/src/browser.c
@@ -48,7 +48,6 @@ char *do_browser(char *path, DIR *dir)
{
char *retval = NULL;
int kbinput;
- bool old_const_update = ISSET(CONST_UPDATE);
char *present_name = NULL;
/* The name of the currently selected file, or of the directory we
* were in before backing up to "..". */
@@ -62,8 +61,6 @@ char *do_browser(char *path, DIR *dir)
blank_statusbar();
bottombars(MBROWSER);
- UNSET(CONST_UPDATE);
-
read_directory_contents:
/* We come here when we refresh or select a new directory. */
@@ -336,10 +333,9 @@ char *do_browser(char *path, DIR *dir)
} else
unbound_key(kbinput);
}
+
titlebar(NULL);
edit_refresh();
- if (old_const_update)
- SET(CONST_UPDATE);
free(path);
diff --git a/src/winio.c b/src/winio.c
@@ -34,8 +34,7 @@ static int *key_buffer = NULL;
static size_t key_buffer_len = 0;
/* The length of the keystroke buffer. */
static int statusblank = 0;
- /* The number of keystrokes left after we call statusbar(),
- * before we actually blank the statusbar. */
+ /* The number of keystrokes left before we blank the statusbar. */
static bool suppress_cursorpos = FALSE;
/* Should we temporarily disable constant cursor position
* display? */
@@ -1704,7 +1703,7 @@ void check_statusblank(void)
if (statusblank > 0) {
statusblank--;
- if (statusblank == 0 && !ISSET(CONST_UPDATE)) {
+ if (statusblank == 0 && (currmenu != MMAIN || !ISSET(CONST_UPDATE))) {
blank_statusbar();
wnoutrefresh(bottomwin);
reset_cursor();