forked from aniani/vim
patch 9.0.1608: update_topline() is called twice
Problem: update_topline() is called twice. Solution: Do not call update_topline() before curs_columns(). (Luuk van Baal, closes #12495)
This commit is contained in:
committed by
Bram Moolenaar
parent
55daae3921
commit
5c606846b9
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1608,
|
||||||
/**/
|
/**/
|
||||||
1607,
|
1607,
|
||||||
/**/
|
/**/
|
||||||
|
14
src/window.c
14
src/window.c
@@ -7032,11 +7032,8 @@ scroll_to_fraction(win_T *wp, int prev_height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (wp == curwin)
|
if (wp == curwin)
|
||||||
{
|
|
||||||
if (get_scrolloff_value())
|
|
||||||
update_topline();
|
|
||||||
curs_columns(FALSE); // validate w_wrow
|
curs_columns(FALSE); // validate w_wrow
|
||||||
}
|
|
||||||
if (prev_height > 0)
|
if (prev_height > 0)
|
||||||
wp->w_prev_fraction_row = wp->w_wrow;
|
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;
|
wp->w_lines_valid = 0;
|
||||||
changed_line_abv_curs_win(wp);
|
changed_line_abv_curs_win(wp);
|
||||||
invalidate_botline_win(wp);
|
invalidate_botline_win(wp);
|
||||||
if (wp == curwin)
|
|
||||||
{
|
if (wp == curwin && *p_spk == 'c')
|
||||||
skip_update_topline = (*p_spk != 'c');
|
|
||||||
update_topline();
|
|
||||||
curs_columns(TRUE); // validate w_wrow
|
curs_columns(TRUE); // validate w_wrow
|
||||||
skip_update_topline = FALSE;
|
|
||||||
}
|
|
||||||
redraw_win_later(wp, UPD_NOT_VALID);
|
redraw_win_later(wp, UPD_NOT_VALID);
|
||||||
wp->w_redr_status = TRUE;
|
wp->w_redr_status = TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user