aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/scroll_opt_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-12-04 06:42:47 +0800
committerGitHub <noreply@github.com>2023-12-04 06:42:47 +0800
commit5651c1ff27a1eb59d120637ba5cbd90f08a3f1d2 (patch)
tree17577a89713212ec5ad693c64869278a0b8ad286 /test/functional/legacy/scroll_opt_spec.lua
parent988b472d902e6116353fc2ae605bed32a37e6391 (diff)
downloadrneovim-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 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index 8ac1141c2b..91dbc120d8 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -1096,6 +1096,26 @@ describe('smoothscroll', function()
]])
end)
+ it('works in Insert mode at bottom of window', function()
+ screen:try_resize(40, 9)
+ exec([[
+ call setline(1, repeat([repeat('A very long line ...', 10)], 5))
+ set wrap smoothscroll scrolloff=0
+ ]])
+ feed('Go123456789<CR>')
+ screen:expect([[
+ <<<ery long line ...A very long line ...|
+ A very long line ...A very long line ...|
+ A very long line ...A very long line ...|
+ A very long line ...A very long line ...|
+ A very long line ...A very long line ...|
+ A very long line ...A very long line ...|
+ 123456789 |
+ ^ |
+ -- INSERT -- |
+ ]])
+ end)
+
it('<<< marker shows with tabline, winbar and splits', function()
screen:try_resize(40, 12)
exec([[