diff options
author | luukvbaal <luukvbaal@gmail.com> | 2023-11-14 23:28:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 06:28:56 +0800 |
commit | f4d95c05b98c2ce2f70e73d4fe6a03cf54ed44cd (patch) | |
tree | ed99e027e46aea8871afc076a4ec5784843a7e31 /src | |
parent | 9e2248ab586c5e5854da68b5310755ea3557e6c9 (diff) | |
download | rneovim-f4d95c05b98c2ce2f70e73d4fe6a03cf54ed44cd.tar.gz rneovim-f4d95c05b98c2ce2f70e73d4fe6a03cf54ed44cd.tar.bz2 rneovim-f4d95c05b98c2ce2f70e73d4fe6a03cf54ed44cd.zip |
vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)
Problem: Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol
closes: vim/vim#13528
https://github.com/vim/vim/commit/bb800a7907209f7d349f87b76b3b9ca30b416298
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/move.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 7a4e98adc5..7cc368a36b 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -1816,7 +1816,9 @@ void scroll_cursor_top(int min_scroll, int always) } } check_topfill(curwin, false); - if (curwin->w_topline == curwin->w_cursor.lnum) { + if (curwin->w_topline != old_topline) { + reset_skipcol(curwin); + } else if (curwin->w_topline == curwin->w_cursor.lnum) { validate_virtcol(); if (curwin->w_skipcol >= curwin->w_virtcol) { // TODO(vim): if the line doesn't fit may optimize w_skipcol instead |