mirror of
https://github.com/jarun/nnn.git
synced 2025-02-26 03:01:32 +00:00
Attempt to fix #1067: hook into ncurses to resize on KEY_RESIZE
This commit is contained in:
parent
e537c22281
commit
145ca91df2
1 changed files with 9 additions and 3 deletions
12
src/nnn.c
12
src/nnn.c
|
@ -1241,7 +1241,8 @@ static void clearoldprompt(void)
|
||||||
{
|
{
|
||||||
clearinfoln();
|
clearinfoln();
|
||||||
tolastln();
|
tolastln();
|
||||||
addch('\n');
|
clrtoeol();
|
||||||
|
resize_term(0, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1250,7 +1251,7 @@ static inline void printmsg_nc(const char *msg)
|
||||||
{
|
{
|
||||||
tolastln();
|
tolastln();
|
||||||
addstr(msg);
|
addstr(msg);
|
||||||
addch('\n');
|
clrtoeol();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printmsg(const char *msg)
|
static void printmsg(const char *msg)
|
||||||
|
@ -2711,6 +2712,11 @@ try_quit:
|
||||||
//DPRINTF_D(c);
|
//DPRINTF_D(c);
|
||||||
//DPRINTF_S(keyname(c));
|
//DPRINTF_S(keyname(c));
|
||||||
|
|
||||||
|
#ifdef KEY_RESIZE
|
||||||
|
if (c == KEY_RESIZE)
|
||||||
|
resize_term(0, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Handle Alt+key */
|
/* Handle Alt+key */
|
||||||
if (c == ESC) {
|
if (c == ESC) {
|
||||||
timeout(0);
|
timeout(0);
|
||||||
|
@ -5839,7 +5845,7 @@ static void statusbar(char *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
addch('\n');
|
clrtoeol();
|
||||||
}
|
}
|
||||||
|
|
||||||
attroff(COLOR_PAIR(cfg.curctx + 1));
|
attroff(COLOR_PAIR(cfg.curctx + 1));
|
||||||
|
|
Loading…
Add table
Reference in a new issue