diff options
author | Yichao Zhou <broken.zhou@gmail.com> | 2017-03-26 04:04:20 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-26 13:04:20 +0200 |
commit | 43a99f77a82e3de980798383ae8a4134953ece06 (patch) | |
tree | ea66fc515d9df1cc91cd84dddad0503a98ac90f5 /test/functional/ui/highlight_spec.lua | |
parent | cf202b74db91133d4861c5cc8952eb0f9511dc83 (diff) | |
download | rneovim-43a99f77a82e3de980798383ae8a4134953ece06.tar.gz rneovim-43a99f77a82e3de980798383ae8a4134953ece06.tar.bz2 rneovim-43a99f77a82e3de980798383ae8a4134953ece06.zip |
highlight: :match should override 'list' (#6343)
Closes #4946
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 945b16ef92..7a1b8c91e7 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -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) |