1
0
forked from aniani/vim

patch 9.0.1561: display wrong when moving cursor to above the top line

Problem:    Display wrong when moving cursor to above the top line and
            'smoothscroll' is set.
Solution:   Call adjust_skipcol() in more places and make it work better.
            (Luuk van Baal, closes #12395)
This commit is contained in:
Luuk van Baal
2023-05-15 18:17:43 +01:00
committed by Bram Moolenaar
parent f741e3ec1f
commit 798fa76dbf
10 changed files with 58 additions and 13 deletions

View File

@@ -1960,12 +1960,14 @@ adjust_skipcol(void)
curwin->w_skipcol -= width2;
else
curwin->w_skipcol -= width1;
redraw_later(UPD_NOT_VALID);
scrolled = TRUE;
validate_virtcol();
}
if (scrolled)
{
validate_virtcol();
redraw_later(UPD_NOT_VALID);
return; // don't scroll in the other direction now
}
int col = curwin->w_virtcol - curwin->w_skipcol + scrolloff_cols;
int row = 0;