From ca7bc4ae8a86b7d1cf1a019f0e3d9026e4e160eb Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 21 May 2020 09:46:13 +0200 Subject: [PATCH] prompt: at Yes-No, do not treat a screen resize as an invalid keystroke Commit 12cf1c99 added a beep() for every invalid keystroke at the Yes-No prompt, but overlooked that KEY_WINCH is not invalid. This fixes https://savannah.gnu.org/bugs/?58422. Bug existed since version 4.8, commit 12cf1c99. --- src/prompt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/prompt.c b/src/prompt.c index 67208665..f66da1c8 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -681,6 +681,9 @@ int do_yesno_prompt(bool all, const char *msg) kbinput = get_kbinput(bottomwin, !all); #ifndef NANO_TINY + if (kbinput == KEY_WINCH) + continue; + /* Accept the first character of an external paste. */ if (bracketed_paste && kbinput == BRACKETED_PASTE_MARKER) kbinput = get_kbinput(bottomwin, BLIND);