tweaks: drop an unneeded assignment, and reshuffle a few lines

And reset the 'lastmessage' variable to a more fitting value.
This commit is contained in:
Benno Schulenberg 2020-07-04 09:34:54 +02:00
parent f21508f071
commit abfde53945
3 changed files with 6 additions and 7 deletions

View File

@ -67,10 +67,10 @@ char *do_browser(char *path)
statusline(ALERT, _("Cannot open directory: %s"), strerror(errno)); statusline(ALERT, _("Cannot open directory: %s"), strerror(errno));
/* If we don't have a file list yet, there is nothing to show. */ /* If we don't have a file list yet, there is nothing to show. */
if (filelist == NULL) { if (filelist == NULL) {
napms(1200); lastmessage = VACUUM;
lastmessage = HUSH;
free(path);
free(present_name); free(present_name);
free(path);
napms(1200);
return NULL; return NULL;
} }
path = mallocstrcpy(path, present_path); path = mallocstrcpy(path, present_path);
@ -101,7 +101,7 @@ char *do_browser(char *path)
titlebar(path); titlebar(path);
while (TRUE) { while (TRUE) {
lastmessage = HUSH; lastmessage = VACUUM;
bottombars(MBROWSER); bottombars(MBROWSER);

View File

@ -2251,7 +2251,7 @@ bool fix_spello(const char *word)
/* If the word isn't found, alert the user; if it is, allow correction. */ /* If the word isn't found, alert the user; if it is, allow correction. */
if (result == 0) { if (result == 0) {
statusline(ALERT, _("Unfindable word: %s"), word); statusline(ALERT, _("Unfindable word: %s"), word);
lastmessage = HUSH; lastmessage = VACUUM;
proceed = TRUE; proceed = TRUE;
napms(2800); napms(2800);
} else if (result == 1) { } else if (result == 1) {

View File

@ -2141,7 +2141,6 @@ void statusline(message_type importance, const char *msg, ...)
/* Curses mode shouldn't be off when trying to write to the status bar. */ /* Curses mode shouldn't be off when trying to write to the status bar. */
if (isendwin()) { if (isendwin()) {
fprintf(stderr, "Out of curses -- please report a bug\n"); fprintf(stderr, "Out of curses -- please report a bug\n");
lastmessage = HUSH;
napms(1400); napms(1400);
return; return;
} }
@ -2227,7 +2226,7 @@ void warn_and_briefly_pause(const char *msg)
{ {
blank_bottombars(); blank_bottombars();
statusline(ALERT, msg); statusline(ALERT, msg);
lastmessage = HUSH; lastmessage = VACUUM;
napms(1500); napms(1500);
} }