aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-05-19 16:14:41 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-19 18:42:23 +0200
commit02ef104d5bcd40c048e8011e0106f30389034674 (patch)
tree5ba08df6ef84cc955a38a552a8d77d9aad0214c8 /src/nvim
parent4c05b1a6ab32880bcc556cf4bf67f1f3edf0c480 (diff)
downloadrneovim-02ef104d5bcd40c048e8011e0106f30389034674.tar.gz
rneovim-02ef104d5bcd40c048e8011e0106f30389034674.tar.bz2
rneovim-02ef104d5bcd40c048e8011e0106f30389034674.zip
vim-patch:9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'
Problem: Display moves up and down with 'incsearch' and 'smoothscroll'. Solution: Do not check if w_skipcol changed. (Luuk van Baal, closes vim/vim#12410, closes vim/vim#12409) https://github.com/vim/vim/commit/0222c2d103ad9298bec4dc8864cd80b4e7559db1
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/move.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index ead2b3b0d3..c9b7ba4ae0 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -248,7 +248,6 @@ void update_topline(win_T *wp)
}
linenr_T old_topline = wp->w_topline;
- colnr_T old_skipcol = wp->w_skipcol;
int old_topfill = wp->w_topfill;
// If the buffer is empty, always set topline to 1.
@@ -413,8 +412,8 @@ void update_topline(win_T *wp)
dollar_vcol = -1;
redraw_later(wp, UPD_VALID);
- // Only reset w_skipcol if it was not just set to make cursor visible.
- if (wp->w_skipcol == old_skipcol) {
+ // When 'smoothscroll' is not set, should reset w_skipcol.
+ if (!wp->w_p_sms) {
reset_skipcol(wp);
}