mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
vim-patch:9.0.1121: cursor positioning and display problems with 'smoothscroll'
Problem: Cursor positioning and display problems with 'smoothscroll' and
using "zt", "zb" or "zz".
Solution: Adjust computations and conditions. (Yee Cheng Chin,
closes vim/vim#11764)
db4d88c2ad
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -499,6 +499,34 @@ describe('smoothscroll', function()
|
||||
-- and since this is a really long line, it will be put on top of the screen.
|
||||
exec('set scrolloff=0')
|
||||
feed('0j')
|
||||
screen:expect([[
|
||||
<<<of text with lots of text with lots o|
|
||||
f text with lots of text end |
|
||||
^four |
|
||||
~ |
|
||||
~ |
|
||||
|
|
||||
]])
|
||||
-- Test zt/zz/zb that they work properly when a long line is above it
|
||||
feed('zb')
|
||||
screen:expect([[
|
||||
<<<th lots of text with lots of text wit|
|
||||
h lots of text with lots of text with lo|
|
||||
ts of text with lots of text with lots o|
|
||||
f text with lots of text end |
|
||||
^four |
|
||||
|
|
||||
]])
|
||||
feed('zz')
|
||||
screen:expect([[
|
||||
<<<of text with lots of text with lots o|
|
||||
f text with lots of text end |
|
||||
^four |
|
||||
~ |
|
||||
~ |
|
||||
|
|
||||
]])
|
||||
feed('zt')
|
||||
screen:expect([[
|
||||
^four |
|
||||
~ |
|
||||
|
||||
Reference in New Issue
Block a user