From f6d2102e2b671ffe28029c0b4b0915e625c3f09f Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 11 Apr 2023 08:27:41 -0700 Subject: [PATCH] fix: icon column does nil-check of config --- lua/oil/columns.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/oil/columns.lua b/lua/oil/columns.lua index 4225edf..03c4620 100644 --- a/lua/oil/columns.lua +++ b/lua/oil/columns.lua @@ -205,12 +205,13 @@ if has_devicons then end end if type == "directory" then - return { conf.directory or " ", "OilDir" } + local icon = conf and conf.directory or " " + return { icon, "OilDir" } else local icon local hl 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 } end end,