Skip to content

Commit d1076b3

Browse files
committed
fix(actions): stopinsert before swtich buf
We previous rely on "switch from terminal buffer to normal buffer" to help us to resume to normal mode, but action set_buf to switch to a terminal buffer again before the modechange #2681 (comment)
1 parent cebf888 commit d1076b3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lua/fzf-lua/actions.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ local set_buf = function(bufnr)
174174
bufhidden = vim.bo.bufhidden
175175
vim.bo.bufhidden = "wipe"
176176
end
177+
-- https://github.com/ibhagwan/fzf-lua/issues/2681#issuecomment-4275010045
178+
vim.cmd.stopinsert()
177179
-- NOTE: nvim_set_current_buf will load the buffer if needed
178180
-- calling bufload will mess up `BufReadPost` autocmds
179181
-- vim.fn.bufload(bufnr)

0 commit comments

Comments
 (0)