commit 3e4339589124ccdd467b8a78fac5bc446d1c6a4a from: Omar Polo date: Sun Mar 21 19:19:59 2021 UTC fix cursor position on first draw and avoid unnecessary redraws commit - acf1502af1d4820c8c0d1fc9c3d692a060722356 commit + 3e4339589124ccdd467b8a78fac5bc446d1c6a4a blob - ec6035aa0bce147c1c8b077104d6202d950a643b blob + 1a5aa87ed74653e99fe573e949121c73ecc07c3f --- ui.c +++ ui.c @@ -556,7 +556,6 @@ cmd_beginning_of_buffer(struct tab *tab) tab->s.curs_y = 0; tab->s.line_x = 0; restore_cursor(tab); - redraw_body(tab); } static void @@ -573,7 +572,6 @@ cmd_end_of_buffer(struct tab *tab) tab->s.current_line = TAILQ_LAST(&tab->s.head, vhead); tab->s.line_x = body_cols; restore_cursor(tab); - redraw_body(tab); } static void @@ -1770,8 +1768,10 @@ void ui_on_tab_refresh(struct tab *tab) { wrap_page(tab); - if (tab->flags & TAB_CURRENT) + if (tab->flags & TAB_CURRENT) { + restore_cursor(tab); redraw_tab(tab); + } } void