diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-17 17:38:35 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-18 10:57:46 +0200 |
commit | e29156356b1895473d2f55c729d949c73014cd3c (patch) | |
tree | 26c5635d075a5cccce1fdf4e19f2a3b67ad4a30f /test/functional/ui/highlight_spec.lua | |
parent | 02e9b5a8eeaf2a4696dd68ab21b33b9fa7bd6a16 (diff) | |
download | rneovim-e29156356b1895473d2f55c729d949c73014cd3c.tar.gz rneovim-e29156356b1895473d2f55c729d949c73014cd3c.tar.bz2 rneovim-e29156356b1895473d2f55c729d949c73014cd3c.zip |
fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
fixes #18160
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index a3943d40b6..28f4c0eb23 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -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) |