hotfix: check that foreground is not empty string to avoid errors

This commit is contained in:
kiyan42
2021-03-09 09:16:18 +01:00
parent 7e3534c2bc
commit 411e3412d1

View File

@@ -8,7 +8,7 @@ local function get_color_from_hl(hl_name, fallback)
if not id then return fallback end
local foreground = vim.fn.synIDattr(id, "fg")
if not foreground then return fallback end
if not foreground or foreground == "" then return fallback end
return foreground
end