comparison src/move.c @ 33769:6e4bf51ec635 v9.0.2105

patch 9.0.2105: skipcol not reset when topline changed Commit: https://github.com/vim/vim/commit/bb800a7907209f7d349f87b76b3b9ca30b416298 Author: Luuk van Baal <luukvbaal@gmail.com> Date: Tue Nov 14 17:05:18 2023 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Tue, 14 Nov 2023 17:15:05 +0100
parents 8fc442c731ca
children f2dd85a2bfc0
comparison
equal deleted inserted replaced
33768:95830543949f 33769:6e4bf51ec635
2421 if (curwin->w_topfill < 0) 2421 if (curwin->w_topfill < 0)
2422 curwin->w_topfill = 0; 2422 curwin->w_topfill = 0;
2423 } 2423 }
2424 check_topfill(curwin, FALSE); 2424 check_topfill(curwin, FALSE);
2425 #endif 2425 #endif
2426 if (curwin->w_topline == curwin->w_cursor.lnum) 2426 if (curwin->w_topline != old_topline)
2427 reset_skipcol();
2428 else if (curwin->w_topline == curwin->w_cursor.lnum)
2427 { 2429 {
2428 validate_virtcol(); 2430 validate_virtcol();
2429 if (curwin->w_skipcol >= curwin->w_virtcol) 2431 if (curwin->w_skipcol >= curwin->w_virtcol)
2430 // TODO: if the line doesn't fit may optimize w_skipcol instead 2432 // TODO: if the line doesn't fit may optimize w_skipcol instead
2431 // of making it zero 2433 // of making it zero