mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.input): don't set prompt interrupt, but use a <c-c>
mapping instead that can be changed
This commit is contained in:
parent
0745505f2f
commit
123f0d9e5d
2 changed files with 1 additions and 3 deletions
|
@ -121,6 +121,7 @@ local defaults = {
|
|||
input = {
|
||||
keys = {
|
||||
["<Esc>"] = "close",
|
||||
["<C-c>"] = { "close", mode = "i" },
|
||||
-- to close the picker on ESC instead of going to normal mode,
|
||||
-- add the following keymap to your config
|
||||
-- ["<Esc>"] = { "close", mode = { "n", "i" } },
|
||||
|
|
|
@ -32,9 +32,6 @@ function M.new(picker)
|
|||
vim.fn.prompt_setcallback(self.win.buf, function()
|
||||
self.win:execute("confirm")
|
||||
end)
|
||||
vim.fn.prompt_setinterrupt(self.win.buf, function()
|
||||
self.win:close()
|
||||
end)
|
||||
end,
|
||||
bo = {
|
||||
filetype = "snacks_picker_input",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue