tui_ti: keep the current line when resizing - sacc - sacc (saccomys): simple gopher client.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 8c49538793ad14ace0230ada9f4fb5f0c951ba32
 (DIR) parent 0573022ce4ceab92394c35c5701abe061f2ec35a
 (HTM) Author: Quentin Rameau <quinq@fifth.space>
       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(-)
       ---
 (DIR) diff --git a/ui_ti.c b/ui_ti.c
       t@@ -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);
        }