mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00:00
fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
fixes #18160
This commit is contained in:
@@ -2335,6 +2335,7 @@ describe('highlight namespaces', function()
|
||||
[5] = {background = Screen.colors.Magenta4, foreground = Screen.colors.Crimson};
|
||||
[6] = {bold = true, reverse = true};
|
||||
[7] = {reverse = true};
|
||||
[8] = {foreground = Screen.colors.Gray20};
|
||||
}
|
||||
|
||||
ns1 = meths.create_namespace 'grungy'
|
||||
@@ -2425,4 +2426,33 @@ describe('highlight namespaces', function()
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('redraws correctly when ns=0', function()
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
|
||||
meths.set_hl(0, 'EndOfBuffer', {fg='#333333'})
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
{8:~ }|
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user