ui_ti: keep the current line when resizing - sacc - sacc(omys), simple console … | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 8c49538793ad14ace0230ada9f4fb5f0c951ba32 | |
parent 0573022ce4ceab92394c35c5701abe061f2ec35a | |
Author: Quentin Rameau <[email protected]> | |
Date: Fri, 28 May 2021 19:13:36 +0200 | |
ui_ti: keep the current line when resizing | |
Previously the current line would change to fit in the new screen size. | |
Instead, change the current screen offset to keep the current line on | |
screen. | |
Diffstat: | |
M ui_ti.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/ui_ti.c b/ui_ti.c | |
@@ -589,7 +589,7 @@ uisigwinch(int signal) | |
return; | |
if (dir->curline - dir->printoff > lines-2) | |
- dir->curline = dir->printoff + lines-2; | |
+ dir->printoff = dir->curline - (lines-2); | |
uidisplay(curentry); | |
} |