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)

9bab7a0243

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Luuk van Baal
2023-04-26 17:08:35 +02:00
parent 8e4a4629ca
commit 3a1973debc
3 changed files with 62 additions and 0 deletions

View File

@@ -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)