fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly

fixes #18160
This commit is contained in:
bfredl
2022-08-17 17:38:35 +02:00
parent 02e9b5a8ee
commit e29156356b
3 changed files with 39 additions and 3 deletions

View File

@@ -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)