commit 51a5f33b5b5da457bc3b8536d1545d613100528d
parent 8aea8625be8da2110b37ba832f3b829fc0d7066d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 19 Nov 2021 16:06:22 +0100
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.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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);