commit db310ac9b6482afb0dd10b87ed80d3e8881a1e0f
parent c11c688420d5e375c98ce7b839a7845b6bc5c41e
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 30 Aug 2016 09:40:51 +0200
input: ignore the resize "key", to prevent reporting an unbound key
In the tiny version it would beep and report an unbound key for every
window resize.
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -305,11 +305,15 @@ int *get_input(WINDOW *win, size_t input_len)
/* Read in a single keystroke, ignoring any that are invalid. */
int get_kbinput(WINDOW *win)
{
- int kbinput;
+ int kbinput = ERR;
/* Extract one keystroke from the input stream. */
- while ((kbinput = parse_kbinput(win)) == ERR)
- ;
+#ifdef KEY_RESIZE
+ while (kbinput == ERR || kbinput == KEY_RESIZE)
+#else
+ while (kbinput == ERR)
+#endif
+ kbinput = parse_kbinput(win);
#ifdef DEBUG
fprintf(stderr, "after parsing: kbinput = %d, meta_key = %s\n",