From 51a5f33b5b5da457bc3b8536d1545d613100528d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 19 Nov 2021 16:06:22 +0100 Subject: [PATCH] feedback: suppress chatty messages when --zero is active Things like "Cancelled" and "Undid addition" are not needed. They are nice for discovery, but become distracting once you know nano. This fixes https://savannah.gnu.org/bugs/?61508. Bug existed since commit 03637030 from last week. --- src/nano.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nano.c b/src/nano.c index c96eb0ee..e802c4b5 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2553,7 +2553,8 @@ int main(int argc, char **argv) else place_the_cursor(); - /* When there are no bars, redraw a relevant status message. */ + /* In barless mode, either redraw a relevant status message, + * or overwrite a minor, redundant one. */ if (ISSET(ZERO) && lastmessage > HUSH) { if (openfile->current_y == editwinrows - 1 && LINES > 1) { edit_scroll(FORWARD); @@ -2561,7 +2562,8 @@ int main(int argc, char **argv) } redrawwin(bottomwin); wnoutrefresh(bottomwin); - } + } else if (ISSET(ZERO) && lastmessage > VACUUM) + wredrawln(edit, editwinrows - 1, 1); place_the_cursor(); wnoutrefresh(edit);