statusbar: on a one-row terminal, drop light messages after a few moments

Only important error messages (ALERT) and information that the user
requested (^C, M-D) should stay put until the next keystroke.  Other
messages should be overwritten by the text of the buffer after just
a few moments, to make a one-row terminal slightly more friendly.

This addresses https://savannah.gnu.org/bugs/?60570.
This commit is contained in:
Benno Schulenberg 2021-05-10 17:03:17 +02:00
parent 2cf28f9db7
commit 8d974cd292

View File

@ -193,7 +193,7 @@ void read_keys_from(WINDOW *win)
curs_set(1);
#ifndef NANO_TINY
if (currmenu == MMAIN && ISSET(MINIBAR) && LINES > 1 && lastmessage > HUSH &&
if (currmenu == MMAIN && (ISSET(MINIBAR) || LINES == 1) && lastmessage > HUSH &&
lastmessage != INFO && lastmessage < ALERT) {
timed = TRUE;
halfdelay(ISSET(QUICK_BLANK) ? 8 : 15);
@ -216,7 +216,11 @@ void read_keys_from(WINDOW *win)
raw();
if (input == ERR) {
minibar();
if (LINES == 1) {
edit_refresh();
curs_set(1);
} else
minibar();
as_an_at = TRUE;
place_the_cursor();
doupdate();