fix: icon column does nil-check of config
This commit is contained in:
parent
98a186e8f9
commit
f6d2102e2b
1 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue