iui_ti: keep the current line when resizing - sacc - sacc(omys), simple console gopher client Err bitreich.org 70 hgit clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ URL:git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ bitreich.org 70 1Log /scm/sacc/log.gph bitreich.org 70 1Files /scm/sacc/files.gph bitreich.org 70 1Refs /scm/sacc/refs.gph bitreich.org 70 1Tags /scm/sacc/tag bitreich.org 70 1LICENSE /scm/sacc/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 8c49538793ad14ace0230ada9f4fb5f0c951ba32 /scm/sacc/commit/8c49538793ad14ace0230ada9f4fb5f0c951ba32.gph bitreich.org 70 1parent 0573022ce4ceab92394c35c5701abe061f2ec35a /scm/sacc/commit/0573022ce4ceab92394c35c5701abe061f2ec35a.gph bitreich.org 70 hAuthor: Quentin Rameau URL:mailto:quinq@fifth.space bitreich.org 70 iDate: Fri, 28 May 2021 19:13:36 +0200 Err bitreich.org 70 i Err bitreich.org 70 iui_ti: keep the current line when resizing Err bitreich.org 70 i Err bitreich.org 70 iPreviously the current line would change to fit in the new screen size. Err bitreich.org 70 iInstead, change the current screen offset to keep the current line on Err bitreich.org 70 iscreen. Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M ui_ti.c | 2 +- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 1 insertion(+), 1 deletion(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/ui_ti.c b/ui_ti.c /scm/sacc/file/ui_ti.c.gph bitreich.org 70 i@@ -589,7 +589,7 @@ uisigwinch(int signal) Err bitreich.org 70 i return; Err bitreich.org 70 i Err bitreich.org 70 i if (dir->curline - dir->printoff > lines-2) Err bitreich.org 70 i- dir->curline = dir->printoff + lines-2; Err bitreich.org 70 i+ dir->printoff = dir->curline - (lines-2); Err bitreich.org 70 i Err bitreich.org 70 i uidisplay(curentry); Err bitreich.org 70 i } Err bitreich.org 70 .