From e9e42898888c39160299745ff94019df048d9786 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 17 Sep 2023 20:15:21 +0200 Subject: [PATCH] Added nil safety for no user choice Signed-off-by: Taken --- lua/taken/functions/themes.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/taken/functions/themes.lua b/lua/taken/functions/themes.lua index 7bb0347..1fc05ed 100644 --- a/lua/taken/functions/themes.lua +++ b/lua/taken/functions/themes.lua @@ -48,6 +48,11 @@ function M.themeselector() end local exec = function(choice) + + if choice == nil then + return + end + vim.cmd("colorscheme " .. choice) local newstring = 'M.colorscheme = "' .. choice .. '"' change_theme(oldstring, newstring)