Fix #1067: handle SIGWINCH the ncurses way

Ref: https://invisible-island.net/ncurses/ncurses-intro.html#xterm
This commit is contained in:
Arun Prakash Jana 2021-06-13 00:16:09 +05:30
parent 4f977ff269
commit f4f6919c02
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 8 additions and 2 deletions

View File

@ -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 */