Skip to content

Commit 1801de8

Browse files
committed
fix: check colorscheme setting before executing update autocmd
#63
1 parent e1889cc commit 1801de8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/cyberdream/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ end, {})
2121
vim.api.nvim_create_autocmd("OptionSet", {
2222
pattern = "background",
2323
callback = function()
24-
if vim.g.cyberdream_opts.theme.variant ~= "auto" then
24+
if vim.g.cyberdream_opts.theme.variant ~= "auto" or vim.fn.execute("colorscheme"):find("cyberdream") == nil then
2525
return
2626
end
2727
local new_variant = vim.v.option_new == "dark" and "default" or "light"

0 commit comments

Comments
 (0)