perf: only do hi clear when non default colorscheme is active

This commit is contained in:
Folke Lemaitre
2021-06-29 09:44:01 +02:00
parent b15ab410a5
commit 0ead86afe3

View File

@@ -222,7 +222,10 @@ end
---@param theme Theme
function util.load(theme)
vim.cmd("hi clear")
-- only needed to clear when not the default colorscheme
if vim.g.colors_name then
vim.cmd("hi clear")
end
-- if vim.fn.exists("syntax_on") then
-- vim.cmd("syntax reset")
-- end