1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-13 13:29:11 +08:00

fix(highlight): silent run hi command

This commit is contained in:
wsdjeg 2023-06-17 14:08:07 +08:00
parent 5bbe678f78
commit dcbc0b34b8

View File

@ -50,8 +50,8 @@ M.hi = function (info)
if vim.fn.empty(info) == 1 or vim.fn.get(info, 'name', '') == '' then
return
end
vim.cmd('hi clear ' .. info.name)
local cmd = 'hi! ' .. info.name
vim.cmd('silent! hi clear ' .. info.name)
local cmd = 'silent hi! ' .. info.name
if vim.fn.empty(info.ctermbg) == 0 then
cmd = cmd .. ' ctermbg=' .. info.ctermbg
end