commit 8c49538793ad14ace0230ada9f4fb5f0c951ba32 Quentin Rameau <quinq@fifth.space> 2021-05-28 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.
ui_ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui_ti.c b/ui_ti.c index 2c3395a..82984bb 100644 --- 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); }