diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-04 06:42:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 06:42:47 +0800 |
commit | 5651c1ff27a1eb59d120637ba5cbd90f08a3f1d2 (patch) | |
tree | 17577a89713212ec5ad693c64869278a0b8ad286 /src/nvim/edit.c | |
parent | 988b472d902e6116353fc2ae605bed32a37e6391 (diff) | |
download | rneovim-5651c1ff27a1eb59d120637ba5cbd90f08a3f1d2.tar.gz rneovim-5651c1ff27a1eb59d120637ba5cbd90f08a3f1d2.tar.bz2 rneovim-5651c1ff27a1eb59d120637ba5cbd90f08a3f1d2.zip |
vim-patch:9.0.2145: wrong scrolling in insert mode with smoothscroll (#26375)
Problem: Wrong scrolling in Insert mode with 'smoothscroll' at the
bottom of the window.
Solution: Don't use set_topline() when 'smoothscroll' is set.
fixes: vim/vim#13612
closes: vim/vim#13613
https://github.com/vim/vim/commit/5b4d1fcbf06757bae32a894871b9a649c84eba7f
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index dd7cd9a573..ba2885a162 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -444,8 +444,11 @@ static int insert_check(VimState *state) // is detected when the cursor column is smaller after inserting something. // Don't do this when the topline changed already, it has already been // adjusted (by insertchar() calling open_line())). + // Also don't do this when 'smoothscroll' is set, as the window should then + // be scrolled by screen lines. if (curbuf->b_mod_set && curwin->w_p_wrap + && !curwin->w_p_sms && !s->did_backspace && curwin->w_topline == s->old_topline && curwin->w_topfill == s->old_topfill) { |