]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1608: update_topline() is called twice v9.0.1608
authorLuuk van Baal <luukvbaal@gmail.com>
Mon, 5 Jun 2023 14:00:05 +0000 (15:00 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Jun 2023 14:00:05 +0000 (15:00 +0100)
Problem:    update_topline() is called twice.
Solution:   Do not call update_topline() before curs_columns(). (Luuk van
            Baal, closes #12495)

src/version.c
src/window.c

index 13a537def8002aaf760fa45b659324bcad94dc63..1a8dd0e604aec34a6a9ec78198a01b9c97e24fd3 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1608,
 /**/
     1607,
 /**/
index eaf89aa95f543fd56feb1ab664f60deb5982dc48..f02aa9f057aa874d56cbd09a57dfa52d6e06f5d9 100644 (file)
@@ -7032,11 +7032,8 @@ scroll_to_fraction(win_T *wp, int prev_height)
     }
 
     if (wp == curwin)
-    {
-       if (get_scrolloff_value())
-           update_topline();
        curs_columns(FALSE);    // validate w_wrow
-    }
+
     if (prev_height > 0)
        wp->w_prev_fraction_row = wp->w_wrow;
 
@@ -7055,13 +7052,10 @@ win_new_width(win_T *wp, int width)
     wp->w_lines_valid = 0;
     changed_line_abv_curs_win(wp);
     invalidate_botline_win(wp);
-    if (wp == curwin)
-    {
-       skip_update_topline = (*p_spk != 'c');
-       update_topline();
+
+    if (wp == curwin && *p_spk == 'c')
        curs_columns(TRUE);     // validate w_wrow
-       skip_update_topline = FALSE;
-    }
+
     redraw_win_later(wp, UPD_NOT_VALID);
     wp->w_redr_status = TRUE;
 }