neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b9482a0a26f4feffd0a7603389fd7270bd43b8ad
parent ba47cb7edab3cf90c171e7ef5a37e7ece46cd5e3
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed,  8 Oct 2025 07:10:59 +0800

test: add a test for #36059

Diffstat:
Mtest/functional/ui/highlight_spec.lua | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+), 0 deletions(-)

diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua @@ -443,6 +443,67 @@ describe('highlight', function() ]]) 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() local screen = Screen.new(20, 5) screen:add_extra_attr_ids {