highlight: :match should override 'list' (#6343)

Closes #4946
This commit is contained in:
Yichao Zhou
2017-03-26 04:04:20 -07:00
committed by Justin M. Keyes
parent cf202b74db
commit 43a99f77a8
2 changed files with 46 additions and 4 deletions

View File

@@ -401,7 +401,7 @@ describe('guisp (special/undercurl)', function()
end)
end)
describe("'cursorline' with 'listchars'", function()
describe("'listchars' highlight", function()
local screen
before_each(function()
@@ -644,4 +644,41 @@ describe("'cursorline' with 'listchars'", function()
|
]])
end)
it("'cursorline' with :match", function()
screen:set_default_attr_ids({
[0] = {bold=true, foreground=Screen.colors.Blue},
[1] = {background=Screen.colors.Grey90},
[2] = {foreground=Screen.colors.Red},
[3] = {foreground=Screen.colors.Green1},
})
execute('highlight clear ModeMsg')
execute('highlight SpecialKey guifg=#FF0000')
execute('highlight Error guifg=#00FF00')
execute('set nowrap')
feed('ia \t bc \t <esc>')
screen:expect([[
a bc ^ |
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
execute('set listchars=space:.,eol:¬,tab:>-,extends:>,precedes:<,trail:* list')
screen:expect([[
a{2:.>-----.}bc{2:*>---*^*}{0:¬} |
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
execute('match Error /\\s\\+$/')
screen:expect([[
a{2:.>-----.}bc{3:*>---*^*}{0:¬} |
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
end)
end)