From 3bb52c56a50729199e7252ebceaaf6f0c8c51f3b Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 25 Jun 2023 22:20:03 -0400 Subject: [PATCH] Absorb resize events in ptest, rather than advancing. After Bill Gray. (ERR check to compensate for unexpected behavior with macOS ncurses.) --- demos/ptest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/ptest.c b/demos/ptest.c index 3f02f3a9..0747b5f2 100644 --- a/demos/ptest.c +++ b/demos/ptest.c @@ -51,16 +51,18 @@ void wait_a_while(long msec) c = getch(); #ifdef KEY_RESIZE - if (c == KEY_RESIZE) + while (c == KEY_RESIZE || (msec == 1 && c == ERR)) { # ifdef PDCURSES resize_term(0, 0); # endif sizecheck(); backfill(); + pflush(); + c = getch(); } - else #endif + if (c == 'q') { endwin();