aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-15 09:56:17 +0800
committerGitHub <noreply@github.com>2022-07-15 09:56:17 +0800
commit73f96ce4c638179abb0bd5a9dc48a6a1d0f3a5bd (patch)
treefc534703c761dfbba2709357073fbbada4b1afba /test/functional/ui/highlight_spec.lua
parent072fb55cb04c03e0ec2d7378ee845d8fd96b2697 (diff)
parent8730643326618bae4a0f7ff90489fa8238fe7c81 (diff)
downloadrneovim-73f96ce4c638179abb0bd5a9dc48a6a1d0f3a5bd.tar.gz
rneovim-73f96ce4c638179abb0bd5a9dc48a6a1d0f3a5bd.tar.bz2
rneovim-73f96ce4c638179abb0bd5a9dc48a6a1d0f3a5bd.zip
Merge pull request #19348 from akinsho/bugfix/winbar-winhighlight
fix(winbar): make setting WinBar and WinBarNC in 'winhighlight' work
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua34
1 files changed, 32 insertions, 2 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 22589fb107..e065a727f3 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -1848,8 +1848,7 @@ describe("'winhighlight' highlight", function()
]], unchanged=true}
end)
-
- it('works local to the buffer', function()
+ it('works local to the window', function()
insert("aa")
command("split")
command("setlocal winhl=Normal:Background1")
@@ -2240,4 +2239,35 @@ describe("'winhighlight' highlight", function()
|
]]}
end)
+
+ it('can override StatusLine and StatusLineNC', function()
+ command('set winhighlight=StatusLine:Background1,StatusLineNC:Background2')
+ command('split')
+ screen:expect([[
+ ^ |
+ {0:~ }|
+ {0:~ }|
+ {1:[No Name] }|
+ |
+ {0:~ }|
+ {5:[No Name] }|
+ |
+ ]])
+ end)
+
+ it('can override WinBar and WinBarNC #19345', function()
+ command('setlocal winbar=foobar')
+ command('set winhighlight=WinBar:Background1,WinBarNC:Background2')
+ command('split')
+ screen:expect([[
+ {1:foobar }|
+ ^ |
+ {0:~ }|
+ {3:[No Name] }|
+ {5:foobar }|
+ |
+ {4:[No Name] }|
+ |
+ ]])
+ end)
end)