From 621f8ba4fa821724e9b646732a26fb2e795fe008 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sat, 9 Nov 2024 22:31:35 -0800 Subject: [PATCH] fix: guard against nil keymaps --- lua/oil/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/oil/config.lua b/lua/oil/config.lua index 2505c3e..0c4f130 100644 --- a/lua/oil/config.lua +++ b/lua/oil/config.lua @@ -359,7 +359,7 @@ M.setup = function(opts) local new_conf = vim.tbl_deep_extend("keep", opts, default_config) if not new_conf.use_default_keymaps then new_conf.keymaps = opts.keymaps or {} - else + elseif opts.keymaps then -- We don't want to deep merge the keymaps, we want any keymap defined by the user to override -- everything about the default. for k, v in pairs(opts.keymaps) do