Skip to content

Commit b0128cc

Browse files
committed
fix(actions): don't stay in quickfix on edit actions
This seems regression of abacb06. Before that commit, we actually rely on an old vim behavior: https://github.com/neovim/neovim/blob/5b0ad4a0607498616b984c63ae1a6903cb835c66/src/nvim/window.c#L3036 When close a window, vim try to avoid to focus a quickfix window: (even your "last accessed window" is alraedy a quickfix window...) > If the cursor goes to the preview or the quickfix window, try > finding another window to go to.
1 parent 69b0d5d commit b0128cc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lua/fzf-lua/actions.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ end
204204
---@param bufedit boolean?
205205
---@return string?
206206
M.vimcmd_entry = function(vimcmd, selected, opts, bufedit)
207+
vim.api.nvim_set_current_win(vim.bo.bt == "quickfix" and vim.fn.win_getid(vim.fn.winnr("#")) or 0)
207208
for i, sel in ipairs(selected) do
208209
(function()
209210
-- Lua 5.1 goto compatiblity hack (function wrap)

0 commit comments

Comments
 (0)