Added nil safety for no user choice

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-09-17 20:15:21 +02:00
parent f02723f41d
commit e9e4289888

View File

@@ -48,6 +48,11 @@ function M.themeselector()
end end
local exec = function(choice) local exec = function(choice)
if choice == nil then
return
end
vim.cmd("colorscheme " .. choice) vim.cmd("colorscheme " .. choice)
local newstring = 'M.colorscheme = "' .. choice .. '"' local newstring = 'M.colorscheme = "' .. choice .. '"'
change_theme(oldstring, newstring) change_theme(oldstring, newstring)