Added nil safety for no user choice
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user