fix: change unknown action name from error to notification

This commit is contained in:
Steven Arcangeli 2024-06-11 06:21:33 -05:00
parent a62ec258d1
commit e5eb20e88f

View file

@ -12,7 +12,7 @@ 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]
assert(action, "Unknown action name: " .. action_name)
vim.notify(action, "[oil.nvim] Unknown action name: " .. action_name, vim.log.levels.ERROR)
return resolve(action)
elseif type(rhs) == "table" then
local opts = vim.deepcopy(rhs)