diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-08 16:57:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-08 16:57:47 +0800 |
commit | 4ce0ada0d4c8c57a181ab08717a3d052d46ae158 (patch) | |
tree | a6aa12dd2c189335fcccc624480cb7d2fa45ed27 /test/functional/ex_cmds/highlight_spec.lua | |
parent | 72d5a13e55e94bdebfffab5f656f553bb76c7b10 (diff) | |
download | rneovim-4ce0ada0d4c8c57a181ab08717a3d052d46ae158.tar.gz rneovim-4ce0ada0d4c8c57a181ab08717a3d052d46ae158.tar.bz2 rneovim-4ce0ada0d4c8c57a181ab08717a3d052d46ae158.zip |
fix(highlight): add missing g: prefix for colors_name (#22952)
Fix #22951.
This was fixed in Vim in patch 8.2.0613.
Diffstat (limited to 'test/functional/ex_cmds/highlight_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/highlight_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/highlight_spec.lua b/test/functional/ex_cmds/highlight_spec.lua index 18f215cf75..45764e6719 100644 --- a/test/functional/ex_cmds/highlight_spec.lua +++ b/test/functional/ex_cmds/highlight_spec.lua @@ -3,6 +3,9 @@ local helpers = require("test.functional.helpers")(after_each) local eq, command = helpers.eq, helpers.command local clear = helpers.clear local eval, exc_exec = helpers.eval, helpers.exc_exec +local exec = helpers.exec +local funcs = helpers.funcs +local meths = helpers.meths describe(':highlight', function() local screen @@ -45,4 +48,20 @@ describe(':highlight', function() eq('', eval('synIDattr(hlID("NonText"), "undercurl", "gui")')) eq('1', eval('synIDattr(hlID("NonText"), "underline", "gui")')) end) + + it('clear', function() + meths.set_var('colors_name', 'foo') + eq(1, funcs.exists('g:colors_name')) + command('hi clear') + eq(0, funcs.exists('g:colors_name')) + meths.set_var('colors_name', 'foo') + eq(1, funcs.exists('g:colors_name')) + exec([[ + func HiClear() + hi clear + endfunc + ]]) + funcs.HiClear() + eq(0, funcs.exists('g:colors_name')) + end) end) |