mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
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
5b4d1fcbf0
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user