commit f420f7c1775b141acda11f6e8216875d499fb862
parent 50954a4b6a38467ec0fd2114e87727cc967abea5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 13 Sep 2022 13:49:17 +0200
verbatim: do not overwrite the status bar when the code is invalid
Move the triggering of the line redraw out of the error path, and
into a better place: next to the normal clearing of the feedback.
This fixes https://savannah.gnu.org/bugs/?63053.
Bug existed since version 6.0, commit 6d828cf4.
Diffstat:
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -3039,7 +3039,13 @@ void do_verbatim_input(void)
if (count < 999)
inject(bytes, count);
- wipe_statusbar();
+#ifndef NANO_TINY
+ /* Ensure that the feedback will be overwritten, or clear it. */
+ if (ISSET(ZERO) && currmenu == MMAIN)
+ wredrawln(midwin, editwinrows - 1, 1);
+ else
+#endif
+ wipe_statusbar();
} else
/* TRANSLATORS: An invalid verbatim Unicode code was typed. */
statusline(AHEM, _("Invalid code"));
diff --git a/src/winio.c b/src/winio.c
@@ -1518,9 +1518,6 @@ char *get_verbatim_kbinput(WINDOW *frame, size_t *count)
/* Turn bracketed-paste mode back on. */
printf("\x1B[?2004h");
fflush(stdout);
-
- if (ISSET(ZERO) && currmenu == MMAIN)
- wredrawln(midwin, editwinrows - 1, 1);
#endif
/* Turn flow control characters back on if necessary and turn the