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.
This commit is contained in:
Benno Schulenberg 2021-11-19 16:06:22 +01:00
parent 8aea8625be
commit 51a5f33b5b

View File

@ -2553,7 +2553,8 @@ int main(int argc, char **argv)
else else
place_the_cursor(); 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 (ISSET(ZERO) && lastmessage > HUSH) {
if (openfile->current_y == editwinrows - 1 && LINES > 1) { if (openfile->current_y == editwinrows - 1 && LINES > 1) {
edit_scroll(FORWARD); edit_scroll(FORWARD);
@ -2561,7 +2562,8 @@ int main(int argc, char **argv)
} }
redrawwin(bottomwin); redrawwin(bottomwin);
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
} } else if (ISSET(ZERO) && lastmessage > VACUUM)
wredrawln(edit, editwinrows - 1, 1);
place_the_cursor(); place_the_cursor();
wnoutrefresh(edit); wnoutrefresh(edit);