nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f4f6919c02d46889800e74f70a82ef5ef80b9e46
parent 4f977ff26963c875ade0b9159d9017b0d9d606ca
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sun, 13 Jun 2021 00:16:09 +0530

Fix #1067: handle SIGWINCH the ncurses way

Ref: https://invisible-island.net/ncurses/ncurses-intro.html#xterm

Diffstat:
Msrc/nnn.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 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 */