diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-12 02:55:22 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-12 02:55:22 -0400 |
commit | d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af (patch) | |
tree | a82201be5b85c63ede348b027ce84a320d59041f /test/functional/ui/highlight_spec.lua | |
parent | 48b2faead8488e102f6d731f9d793aafc58dc537 (diff) | |
parent | 130a1a6bb296ce21ecb7052fe42d105852b85c59 (diff) | |
download | rneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.tar.gz rneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.tar.bz2 rneovim-d02cfe80618bb85cc1cc4a19a9cfc69ae64b98af.zip |
Merge pull request #4733 from AdnoC/hi-link-cleared-group
Fix linking a cleared highlight group
Closes #4549
Closes #2756
Closes #4236
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 4b0173fa89..06139277b2 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -262,4 +262,44 @@ describe('Default highlight groups', function() ]], {[1] = {bold = true, foreground = hlgroup_colors.Question}}) feed('<cr>') -- skip the "Press ENTER..." state or tests will hang end) + it('can be cleared and linked to other highlight groups', function() + execute('highlight clear ModeMsg') + feed('i') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + -- INSERT -- | + ]], {}) + feed('<esc>') + execute('highlight CustomHLGroup guifg=red guibg=green') + execute('highlight link ModeMsg CustomHLGroup') + feed('i') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + {1:-- INSERT --} | + ]], {[1] = {foreground = Screen.colors.Red, background = Screen.colors.Green}}) + end) end) |