mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
fix(highlight): winhl receive wrong argument
This commit is contained in:
@@ -8,6 +8,7 @@ local feed_command, eq = helpers.feed_command, helpers.eq
|
||||
local curbufmeths = helpers.curbufmeths
|
||||
local funcs = helpers.funcs
|
||||
local meths = helpers.meths
|
||||
local exec_lua = helpers.exec_lua
|
||||
|
||||
describe('colorscheme compatibility', function()
|
||||
before_each(function()
|
||||
@@ -2641,4 +2642,17 @@ describe('highlight namespaces', function()
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('winhl does not accept invalid value #24586', function()
|
||||
local res = exec_lua([[
|
||||
local curwin = vim.api.nvim_get_current_win()
|
||||
vim.api.nvim_command("set winhl=Normal:Visual")
|
||||
local _, msg = pcall(vim.api.nvim_command,"set winhl='Normal:Wrong'")
|
||||
return { msg, vim.wo[curwin].winhl }
|
||||
]])
|
||||
eq({
|
||||
"Vim(set):E5248: Invalid character in group name",
|
||||
"Normal:Visual",
|
||||
},res)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user