Skip to content

Commit b19dabe

Browse files
committed
fix: regression from d7497da (closes #2417)
1 parent be1c28b commit b19dabe

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lua/fzf-lua/actions.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ end
129129

130130
-- Dummy abort action for `esc|ctrl-c|ctrl-q`
131131
M.dummy_abort = function(_, o)
132+
-- try to resume mode if `complete` is set
133+
if o.complete and o.__CTX.mode == "i" then
134+
vim.cmd [[noautocmd lua vim.api.nvim_feedkeys('i', 'n', true)]]
135+
end
132136
end
133137

134138
M.resume = function(_, _)

lua/fzf-lua/win.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,6 @@ function FzfWin:close(fzf_bufnr, hide, hidden)
13181318
-- Restore insert/normal-terminal mode (#2054)
13191319
if utils.__CTX().mode == "nt" then
13201320
utils.feed_keys_termcodes([[<C-\><C-n>]])
1321-
elseif utils.__CTX().mode == "i" then
1322-
vim.cmd [[noautocmd lua vim.api.nvim_feedkeys('i', 'n', true)]]
13231321
end
13241322
if self.winopts and type(self.winopts.on_close) == "function" then
13251323
self.winopts.on_close()

0 commit comments

Comments
 (0)