mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Fix #1067: handle SIGWINCH the ncurses way
Ref: https://invisible-island.net/ncurses/ncurses-intro.html#xterm
This commit is contained in:
parent
4f977ff269
commit
f4f6919c02
10
src/nnn.c
10
src/nnn.c
|
@ -1237,13 +1237,19 @@ static void clearinfoln(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KEY_RESIZE
|
#ifdef KEY_RESIZE
|
||||||
|
static void handle_key_resize()
|
||||||
|
{
|
||||||
|
endwin();
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
/* Clear the old prompt */
|
/* Clear the old prompt */
|
||||||
static void clearoldprompt(void)
|
static void clearoldprompt(void)
|
||||||
{
|
{
|
||||||
clearinfoln();
|
clearinfoln();
|
||||||
tolastln();
|
tolastln();
|
||||||
clrtoeol();
|
clrtoeol();
|
||||||
resize_term(0, 0);
|
handle_key_resize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2722,7 +2728,7 @@ try_quit:
|
||||||
|
|
||||||
#ifdef KEY_RESIZE
|
#ifdef KEY_RESIZE
|
||||||
if (c == KEY_RESIZE)
|
if (c == KEY_RESIZE)
|
||||||
resize_term(0, 0);
|
handle_key_resize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Handle Alt+key */
|
/* Handle Alt+key */
|
||||||
|
|
Loading…
Reference in a new issue