Archived
0
0
Fork 0

fix winbar crash on no icon

This commit is contained in:
Daryl Ronningen 2022-07-19 12:08:53 -07:00
parent 68bd531662
commit c091b7b5fe
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B

View file

@ -59,14 +59,8 @@ local function get_fileicon()
file_path = file_path:gsub("^%/", "")
if not is_empty(filename) then
local default = false
if is_empty(file_type) then
file_type = ""
default = true
end
file_icon, file_icon_color =
require("nvim-web-devicons").get_icon_color(filename, file_type, { default = default })
require("nvim-web-devicons").get_icon_color(filename, file_type, { default = true })
vim.api.nvim_set_hl(0, hl_winbar_file_icon, { fg = file_icon_color })
end