nano

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

commit 8d974cd2922db2222be7b3d3e6f47899b98f6ec8
parent 2cf28f9db7566d2415d2679d0d4c3ffb8bee5411
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 10 May 2021 17:03:17 +0200

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.

Diffstat:
Msrc/winio.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -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();