Skip to content

Commit

Permalink
fix(ui_select): restore INSERT mode (closes #1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 16, 2024
1 parent 8d35de5 commit 661b5de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/fzf-lua/providers/ui_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ M.ui_select = function(items, ui_opts, on_choice)
opts.fn_selected = function(selected, o)
config.set_action_helpstr(o.actions.enter, nil)

if o.__CTX.mode == "i" then
vim.cmd [[noautocmd lua vim.api.nvim_feedkeys('i', 'n', true)]]
end

if not selected then
-- with `actions.dummy_abort` this doesn't get called anymore
-- as the action is configured as a valid fzf "accept" (thus
Expand Down

0 comments on commit 661b5de

Please sign in to comment.