diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-04-08 22:40:55 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-04-09 00:51:06 +0200 |
commit | 8f5fd0884b4424d028feef1bccd018a48c93a59c (patch) | |
tree | 9218c97bc1076dd8cd84fac9588bbbd0578b049e /src/nvim/plines.c | |
parent | e21423bb35077fe4bbb6a8fab1000e8bfc6b6b7b (diff) | |
download | rneovim-8f5fd0884b4424d028feef1bccd018a48c93a59c.tar.gz rneovim-8f5fd0884b4424d028feef1bccd018a48c93a59c.tar.bz2 rneovim-8f5fd0884b4424d028feef1bccd018a48c93a59c.zip |
vim-patch:9.1.0280: several issues with 'smoothscroll' support
Problem: Logic to make sure cursor is in visible part of the screen after
scrolling the text with 'smoothscroll' is scattered, asymmetric
and contains bugs.
Solution: Adjust and create helper function for 'smoothscroll' cursor logic.
(Luuk van Baal)
https://github.com/vim/vim/commit/9148ba8a46baa3934c44164989cdcdec5d01d9e3
Diffstat (limited to 'src/nvim/plines.c')
-rw-r--r-- | src/nvim/plines.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/plines.c b/src/nvim/plines.c index d90ee9c1ba..8734780415 100644 --- a/src/nvim/plines.c +++ b/src/nvim/plines.c @@ -885,6 +885,9 @@ int plines_m_win(win_T *wp, linenr_T first, linenr_T last, bool limit_winheight) count += plines_win_full(wp, first, &next, NULL, false, limit_winheight); first = next + 1; } + if (first == wp->w_buffer->b_ml.ml_line_count + 1) { + count += win_get_fill(wp, first); + } return count; } |