fix: vim.notify call error

This commit is contained in:
Steven Arcangeli 2024-06-11 06:27:39 -05:00
parent 61f1967222
commit 76bfc25520

View file

@ -12,7 +12,9 @@ local function resolve(rhs)
if type(rhs) == "string" and vim.startswith(rhs, "actions.") then
local action_name = vim.split(rhs, ".", { plain = true })[2]
local action = actions[action_name]
vim.notify(action, "[oil.nvim] Unknown action name: " .. action_name, vim.log.levels.ERROR)
if not action then
vim.notify("[oil.nvim] Unknown action name: " .. action_name, vim.log.levels.ERROR)
end
return resolve(action)
elseif type(rhs) == "table" then
local opts = vim.deepcopy(rhs)