aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-01-28 12:49:29 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-01-28 19:10:41 +0100
commitbfe84adb5a097488fa723f9917253bd6f0fbf662 (patch)
treedb3d4a0030518377bd529a77437aa2718d312409 /test/functional/ui/highlight_spec.lua
parente956ea767241268861f0a8f7556700516849b112 (diff)
downloadrneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.tar.gz
rneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.tar.bz2
rneovim-bfe84adb5a097488fa723f9917253bd6f0fbf662.zip
options: winhighlight: fix incorrect string equality test
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index d7791a3107..28e4e88326 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -1186,6 +1186,7 @@ describe("'winhighlight' highlight", function()
[25] = {bold = true, foreground = Screen.colors.Green1},
[26] = {background = Screen.colors.Red},
[27] = {background = Screen.colors.DarkBlue, bold = true, foreground = Screen.colors.Green1},
+ [28] = {bold = true, foreground = Screen.colors.Brown},
})
command("hi Background1 guibg=DarkBlue")
command("hi Background2 guibg=DarkGreen")
@@ -1598,4 +1599,45 @@ describe("'winhighlight' highlight", function()
{21:-- }{22:match 1 of 3} |
]])
end)
+
+ it('can override CursorLine and CursorLineNr', function()
+ -- CursorLine used to be parsed as CursorLineNr, because strncmp
+ command('set cursorline number')
+ command('split')
+ command('set winhl=CursorLine:Background1')
+ screen:expect{grid=[[
+ {28: 1 }{1:^ }|
+ {0:~ }|
+ {0:~ }|
+ {3:[No Name] }|
+ {28: 1 }{18: }|
+ {0:~ }|
+ {4:[No Name] }|
+ |
+ ]]}
+
+ command('set winhl=CursorLineNr:Background2,CursorLine:Background1')
+ screen:expect{grid=[[
+ {5: 1 }{1:^ }|
+ {0:~ }|
+ {0:~ }|
+ {3:[No Name] }|
+ {28: 1 }{18: }|
+ {0:~ }|
+ {4:[No Name] }|
+ |
+ ]]}
+
+ feed('<c-w>w')
+ screen:expect{grid=[[
+ {5: 1 }{1: }|
+ {0:~ }|
+ {0:~ }|
+ {4:[No Name] }|
+ {28: 1 }{18:^ }|
+ {0:~ }|
+ {3:[No Name] }|
+ |
+ ]]}
+ end)
end)