forked from aniani/vim
patch 9.0.1568: with 'smoothscroll' cursor may move below botline
Problem: With 'smoothscroll' cursor may move below botline.
Solution: Call redraw_later() if needed, Compute cursor row with adjusted
condition. (Luuk van Baal, closes #12415)
This commit is contained in:
committed by
Bram Moolenaar
parent
d13c254d10
commit
d49f646bf5
@@ -519,6 +519,8 @@ update_topline(void)
|
||||
// When 'smoothscroll' is not set, should reset w_skipcol.
|
||||
if (!curwin->w_p_sms)
|
||||
reset_skipcol();
|
||||
else if (curwin->w_skipcol != 0)
|
||||
redraw_later(UPD_SOME_VALID);
|
||||
|
||||
// May need to set w_skipcol when cursor in w_topline.
|
||||
if (curwin->w_cursor.lnum == curwin->w_topline)
|
||||
@@ -892,10 +894,11 @@ curs_rows(win_T *wp)
|
||||
--i; // hold at inserted lines
|
||||
}
|
||||
if (valid
|
||||
&& (lnum != wp->w_topline || (wp->w_skipcol == 0
|
||||
#ifdef FEAT_DIFF
|
||||
&& (lnum != wp->w_topline || !wp->w_p_diff)
|
||||
&& !wp->w_p_diff
|
||||
#endif
|
||||
)
|
||||
)))
|
||||
{
|
||||
#ifdef FEAT_FOLDING
|
||||
lnum = wp->w_lines[i].wl_lastlnum + 1;
|
||||
|
||||
Reference in New Issue
Block a user