mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.actions): dont overwrite existing actions
This commit is contained in:
parent
70e3b6681e
commit
15cd5901d9
1 changed files with 6 additions and 5 deletions
|
@ -78,11 +78,12 @@ function M.resolve(action, picker, name)
|
|||
desc = name or nil,
|
||||
} or action
|
||||
---@cast action snacks.picker.Action
|
||||
local fn = action.action
|
||||
action.action = function()
|
||||
return fn(picker, picker:current())
|
||||
end
|
||||
return action
|
||||
return {
|
||||
action = function(_, item)
|
||||
return action.action(picker, item)
|
||||
end,
|
||||
desc = action.desc,
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue