Check for resize after getch.
authorTimo Korvola <tkorvola@iki.fi>
Sat, 27 Jan 2018 22:21:59 +0000 (00:21 +0200)
committerTimo Korvola <tkorvola@iki.fi>
Sat, 27 Jan 2018 22:21:59 +0000 (00:21 +0200)
Most of the time is spent in getch, so that is when we'll likely
get SIGWINCH.

src/curses/ux_input.c

index 70b9b703657e143e3b65e31718ad47a7412c5273..b4c404bc0b8e1daf05ff3f1c3578417f8bb7d983 100644 (file)
@@ -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)