mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
vim-patch:9.0.0673: first line wong with 'smoothscroll' and 'scrolloff' zero
Problem: First line not scrolled properly with 'smoothscroll' and
'scrolloff' zero and using "k".
Solution: Make sure the cursor position is visible.
46b54747c5
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -307,7 +307,7 @@ describe('smoothscroll', function()
|
||||
screen:try_resize(40, 8)
|
||||
exec([[
|
||||
call setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7))
|
||||
set smoothscroll scrolloff=0
|
||||
set smoothscroll scrolloff=0 display=
|
||||
:3
|
||||
]])
|
||||
screen:expect([[
|
||||
@@ -322,9 +322,22 @@ describe('smoothscroll', function()
|
||||
]])
|
||||
feed('j')
|
||||
screen:expect_unchanged()
|
||||
-- moving cursor down - whole bottom line shows
|
||||
feed('<C-E>j')
|
||||
screen:expect_unchanged()
|
||||
feed('G')
|
||||
screen:expect_unchanged()
|
||||
-- moving cursor up - whole top line shows
|
||||
feed('2k')
|
||||
screen:expect([[
|
||||
^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 |
|
||||
@ |
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user