fix: icon column does nil-check of config

This commit is contained in:
Steven Arcangeli 2023-04-11 08:27:41 -07:00
parent 98a186e8f9
commit f6d2102e2b

View file

@ -205,12 +205,13 @@ if has_devicons then
end end
end end
if type == "directory" then if type == "directory" then
return { conf.directory or "", "OilDir" } local icon = conf and conf.directory or ""
return { icon, "OilDir" }
else else
local icon local icon
local hl local hl
icon, hl = devicons.get_icon(name) icon, hl = devicons.get_icon(name)
icon = icon or conf.default_file or "" icon = icon or (conf and conf.default_file or "")
return { icon .. " ", hl } return { icon .. " ", hl }
end end
end, end,