fix(picker.actions): keymap confirm. Closes #1252

This commit is contained in:
Folke Lemaitre 2025-02-18 23:05:40 +01:00
parent 570c035b94
commit a9a84dde2e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -421,11 +421,14 @@ M.keymaps = {
plugs = false,
["local"] = true,
modes = { "n", "v", "x", "s", "o", "i", "c", "t" },
---@param picker snacks.Picker
confirm = function(picker, item)
picker:close()
if item then
vim.api.nvim_input(item.item.lhs)
end
picker:norm(function()
if item then
picker:close()
vim.api.nvim_input(item.item.lhs)
end
end)
end,
actions = {
toggle_global = function(picker)