aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-08-18 12:16:27 +0200
committerGitHub <noreply@github.com>2022-08-18 12:16:27 +0200
commit700a6fb9d4689ebfeea1139370351eafef74f302 (patch)
treefb156643949be55862218f4b73e96bcb5cbe14a7 /test/functional/ui/highlight_spec.lua
parent39494be2a4caeb619846766a3701e18814ccf431 (diff)
parente29156356b1895473d2f55c729d949c73014cd3c (diff)
downloadrneovim-700a6fb9d4689ebfeea1139370351eafef74f302.tar.gz
rneovim-700a6fb9d4689ebfeea1139370351eafef74f302.tar.bz2
rneovim-700a6fb9d4689ebfeea1139370351eafef74f302.zip
Merge pull request #19822 from bfredl/hldef
fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 64194e17be..4e3d62509c 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -2351,6 +2351,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'
@@ -2441,4 +2442,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)