mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 03:16:31 +00:00
test: add a test for #36059
This commit is contained in:
@@ -443,6 +443,67 @@ describe('highlight', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("is updated with H/L and 'scrolloff' #36059", function()
|
||||||
|
local screen = Screen.new(40, 10)
|
||||||
|
exec([[
|
||||||
|
call setline(1, map(range(1, 100), "'line ' .. v:val"))
|
||||||
|
set scrolloff=2 nostartofline
|
||||||
|
call cursor(50, 1)
|
||||||
|
]])
|
||||||
|
feed('z<CR>V')
|
||||||
|
screen:expect([[
|
||||||
|
line 48 |
|
||||||
|
line 49 |
|
||||||
|
^l{17:ine 50} |
|
||||||
|
line 51 |
|
||||||
|
line 52 |
|
||||||
|
line 53 |
|
||||||
|
line 54 |
|
||||||
|
line 55 |
|
||||||
|
line 56 |
|
||||||
|
{5:-- VISUAL LINE --} |
|
||||||
|
]])
|
||||||
|
feed('L')
|
||||||
|
screen:expect([[
|
||||||
|
line 48 |
|
||||||
|
line 49 |
|
||||||
|
{17:line 50} |
|
||||||
|
{17:line 51} |
|
||||||
|
{17:line 52} |
|
||||||
|
{17:line 53} |
|
||||||
|
^l{17:ine 54} |
|
||||||
|
line 55 |
|
||||||
|
line 56 |
|
||||||
|
{5:-- VISUAL LINE --} |
|
||||||
|
]])
|
||||||
|
feed('<Esc>V')
|
||||||
|
screen:expect([[
|
||||||
|
line 48 |
|
||||||
|
line 49 |
|
||||||
|
line 50 |
|
||||||
|
line 51 |
|
||||||
|
line 52 |
|
||||||
|
line 53 |
|
||||||
|
^l{17:ine 54} |
|
||||||
|
line 55 |
|
||||||
|
line 56 |
|
||||||
|
{5:-- VISUAL LINE --} |
|
||||||
|
]])
|
||||||
|
feed('H')
|
||||||
|
screen:expect([[
|
||||||
|
line 48 |
|
||||||
|
line 49 |
|
||||||
|
^l{17:ine 50} |
|
||||||
|
{17:line 51} |
|
||||||
|
{17:line 52} |
|
||||||
|
{17:line 53} |
|
||||||
|
{17:line 54} |
|
||||||
|
line 55 |
|
||||||
|
line 56 |
|
||||||
|
{5:-- VISUAL LINE --} |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
|
||||||
it('cterm=standout gui=standout', function()
|
it('cterm=standout gui=standout', function()
|
||||||
local screen = Screen.new(20, 5)
|
local screen = Screen.new(20, 5)
|
||||||
screen:add_extra_attr_ids {
|
screen:add_extra_attr_ids {
|
||||||
|
Reference in New Issue
Block a user