1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2016-05-15 11:17:55 +02:00
родитель 681f042326
Коммит 2cd21da4f0
2 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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();