| Date: Thu, 22 Feb 2018 18:23:33 +0100
Improve terminal resizing when current line is over term size
Diffstat:
M ui_ti.c | 8 ++++++++
1 file changed, 8 insertions(+), 0 deletions(-)
--- |
| @@ -543,8 +543,16 @@ uiselectitem(Item *entry)
void
uisigwinch(int signal)
{
+ Dir *dir;
+
setupterm(NULL, 1, NULL);
putp(tparm(change_scroll_region, 0, lines-2));
+ if (!curentry || !(dir = curentry->dat))
+ return;
+
+ if (dir->curline - dir->printoff > lines-2)
+ dir->curline = dir->printoff + lines-2;
+
uidisplay(curentry);
} |