Introduction
Introduction Statistics Contact Development Disclaimer Help
Improve terminal resizing when current line is over term size - sacc - sacc - s…
git clone git://git.codemadness.org/sacc
Log
Files
Refs
LICENSE
---
commit ddf996b8f35253bbb2509bff03e5c4e7cc056010
parent 820448916f944175130c12b16a0cd6a6aae7b433
Author: Quentin Rameau <[email protected]>
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(-)
---
diff --git a/ui_ti.c b/ui_ti.c
@@ -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);
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.