From: Arun Prakash Jana Date: Sat, 12 Jun 2021 18:46:09 +0000 (+0530) Subject: Fix #1067: handle SIGWINCH the ncurses way X-Git-Tag: v4.2~94 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f4f6919c02d46889800e74f70a82ef5ef80b9e46;p=nnn.git Fix #1067: handle SIGWINCH the ncurses way Ref: https://invisible-island.net/ncurses/ncurses-intro.html#xterm --- diff --git a/src/nnn.c b/src/nnn.c index bd294834..d6ff427b 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1237,13 +1237,19 @@ static void clearinfoln(void) } #ifdef KEY_RESIZE +static void handle_key_resize() +{ + endwin(); + refresh(); +} + /* Clear the old prompt */ static void clearoldprompt(void) { clearinfoln(); tolastln(); clrtoeol(); - resize_term(0, 0); + handle_key_resize(); } #endif @@ -2722,7 +2728,7 @@ try_quit: #ifdef KEY_RESIZE if (c == KEY_RESIZE) - resize_term(0, 0); + handle_key_resize(); #endif /* Handle Alt+key */