handle cases where filetype icon highlight is not set (#589)
This commit is contained in:
parent
32c85cd214
commit
09f749cbb1
|
@ -37,6 +37,7 @@ function M:apply_icon()
|
|||
|
||||
if icon and self.options.colored then
|
||||
local highlight_color = modules.utils.extract_highlight_colors(icon_highlight_group, 'fg')
|
||||
if highlight_color then
|
||||
local default_highlight = self:get_default_hl()
|
||||
local icon_highlight = icon_hl_cache[highlight_color]
|
||||
if not icon_highlight or not modules.highlight.highlight_exists(icon_highlight.name .. '_normal') then
|
||||
|
@ -51,6 +52,7 @@ function M:apply_icon()
|
|||
|
||||
icon = modules.highlight.component_format_highlight(icon_highlight) .. icon .. default_highlight
|
||||
end
|
||||
end
|
||||
else
|
||||
ok = vim.fn.exists('*WebDevIconsGetFileTypeSymbol')
|
||||
if ok ~= 0 then
|
||||
|
|
Loading…
Reference in New Issue