forked from aniani/vim
patch 9.0.1603: display wrong if scrolling multiple lines with 'smoothscroll'
Problem: Display wrong when scrolling multiple lines with 'smoothscroll'
set.
Solution: Redraw when w_skipcol changed. (closes #12477, closes #12468)
This commit is contained in:
@@ -1785,6 +1785,7 @@ scrollup(
|
||||
int width2 = width1 + curwin_col_off2();
|
||||
int size = 0;
|
||||
linenr_T prev_topline = curwin->w_topline;
|
||||
colnr_T prev_skipcol = curwin->w_skipcol;
|
||||
|
||||
if (do_sms)
|
||||
size = linetabsize(curwin, curwin->w_topline);
|
||||
@@ -1847,8 +1848,9 @@ scrollup(
|
||||
}
|
||||
}
|
||||
|
||||
if (curwin->w_topline == prev_topline)
|
||||
// need to redraw even though w_topline didn't change
|
||||
if (curwin->w_topline == prev_topline
|
||||
|| curwin->w_skipcol != prev_skipcol)
|
||||
// need to redraw because wl_size of the topline may now be invalid
|
||||
redraw_later(UPD_NOT_VALID);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user