1
1

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.
Этот коммит содержится в:
Benno Schulenberg 2022-09-13 13:49:17 +02:00
родитель 50954a4b6a
Коммит f420f7c177
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -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"));

Просмотреть файл

@ -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