1
0
forked from aniani/vim

patch 9.0.2105: skipcol not reset when topline changed

Problem:  Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol

closes: #13528
closes: #13532

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Luuk van Baal
2023-11-14 17:05:18 +01:00
committed by Christian Brabandt
parent bc8f79d36a
commit bb800a7907
4 changed files with 36 additions and 1 deletions

View File

@@ -2423,7 +2423,9 @@ scroll_cursor_top(int min_scroll, int always)
}
check_topfill(curwin, FALSE);
#endif
if (curwin->w_topline == curwin->w_cursor.lnum)
if (curwin->w_topline != old_topline)
reset_skipcol();
else if (curwin->w_topline == curwin->w_cursor.lnum)
{
validate_virtcol();
if (curwin->w_skipcol >= curwin->w_virtcol)