aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/scroll_opt_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-04-26 17:08:35 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-02 13:11:46 +0200
commit3a1973debceca29e65c4f7c83d025cb3314ebaf2 (patch)
tree9e95232ac61fcf9dda8389526a50165234d8e431 /test/functional/legacy/scroll_opt_spec.lua
parent8e4a4629cab3377ba6fd5e291cf5f17fb4ff8a5c (diff)
downloadrneovim-3a1973debceca29e65c4f7c83d025cb3314ebaf2.tar.gz
rneovim-3a1973debceca29e65c4f7c83d025cb3314ebaf2.tar.bz2
rneovim-3a1973debceca29e65c4f7c83d025cb3314ebaf2.zip
vim-patch:9.0.0672: line partly shows with 'smoothscroll' and 'scrolloff' zero
Problem: Cursor line only partly shows with 'smoothscroll' and 'scrolloff' zero. Solution: Do not use 'smoothscroll' when adjusting the bottom of the window. (closes vim/vim#11269) https://github.com/vim/vim/commit/9bab7a024393200bb2c03b3abddfda86436990a7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index 90417d93f3..c63401cb02 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -301,4 +301,30 @@ describe('smoothscroll', function()
feed('<C-E>')
screen:expect_unchanged()
end)
+
+ -- oldtest: Test_smoothscroll_wrap_scrolloff_zero()
+ it("works with zero 'scrolloff'", function()
+ screen:try_resize(40, 8)
+ exec([[
+ call setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7))
+ set smoothscroll scrolloff=0
+ :3
+ ]])
+ screen:expect([[
+ <<<h some text with some text |
+ Line with some text with some text with |
+ some text with some text with some text |
+ with some text with some text |
+ ^Line with some text with some text with |
+ some text with some text with some text |
+ with some text with some text |
+ |
+ ]])
+ feed('j')
+ screen:expect_unchanged()
+ feed('<C-E>j')
+ screen:expect_unchanged()
+ feed('G')
+ screen:expect_unchanged()
+ end)
end)