nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit abfde53945e6e6107994c7c9ab87fcff16d98a25
parent f21508f071dab657b8378c798b3c6233ec1d2d08
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  4 Jul 2020 09:34:54 +0200

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

And reset the 'lastmessage' variable to a more fitting value.

Diffstat:
Msrc/browser.c | 8++++----
Msrc/text.c | 2+-
Msrc/winio.c | 3+--
3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -67,10 +67,10 @@ char *do_browser(char *path) statusline(ALERT, _("Cannot open directory: %s"), strerror(errno)); /* If we don't have a file list yet, there is nothing to show. */ if (filelist == NULL) { - napms(1200); - lastmessage = HUSH; - free(path); + lastmessage = VACUUM; free(present_name); + free(path); + napms(1200); return NULL; } path = mallocstrcpy(path, present_path); @@ -101,7 +101,7 @@ char *do_browser(char *path) titlebar(path); while (TRUE) { - lastmessage = HUSH; + lastmessage = VACUUM; bottombars(MBROWSER); diff --git a/src/text.c b/src/text.c @@ -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 (result == 0) { statusline(ALERT, _("Unfindable word: %s"), word); - lastmessage = HUSH; + lastmessage = VACUUM; proceed = TRUE; napms(2800); } else if (result == 1) { diff --git a/src/winio.c b/src/winio.c @@ -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. */ if (isendwin()) { fprintf(stderr, "Out of curses -- please report a bug\n"); - lastmessage = HUSH; napms(1400); return; } @@ -2227,7 +2226,7 @@ void warn_and_briefly_pause(const char *msg) { blank_bottombars(); statusline(ALERT, msg); - lastmessage = HUSH; + lastmessage = VACUUM; napms(1500); }