From c091b7b5fe370b5c0404046a82213ee657e4db00 Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Tue, 19 Jul 2022 12:08:53 -0700 Subject: [PATCH] fix winbar crash on no icon --- lua/user/winbar.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/user/winbar.lua b/lua/user/winbar.lua index e2c0724..cbde77d 100644 --- a/lua/user/winbar.lua +++ b/lua/user/winbar.lua @@ -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