From 70f7f55ef43a13eace39e2f59c23f11fb1ed3880 Mon Sep 17 00:00:00 2001 From: Timo Korvola Date: Sun, 28 Jan 2018 00:21:59 +0200 Subject: [PATCH] Check for resize after getch. Most of the time is spent in getch, so that is when we'll likely get SIGWINCH. --- src/curses/ux_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/curses/ux_input.c b/src/curses/ux_input.c index 70b9b70..b4c404b 100644 --- a/src/curses/ux_input.c +++ b/src/curses/ux_input.c @@ -130,12 +130,12 @@ static int unix_read_char(int extkeys) int c; while(1) { + timeout( timeout_to_ms()); + c = getch(); while (terminal_resized) { terminal_resized = 0; unix_resize_display(); } - timeout( timeout_to_ms()); - c = getch(); /* Catch 98% of all input right here... */ if ((c >= ZC_ASCII_MIN && c <= ZC_ASCII_MAX) -- 2.34.1