Skip to content

Commit b3e9303

Browse files
committed
fix(core): do not clear context on interface swap (#1810)
1 parent 81c5256 commit b3e9303

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/fzf-lua/core.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,11 @@ M.fzf = function(contents, opts)
473473
and (action[1] ~= nil or action.reload or action.noclose or action.reuse)
474474
if (not fzf_win:autoclose() == false) and not do_not_close then
475475
fzf_win:close(fzf_bufnr)
476-
M.__CTX = nil
476+
-- only clear context if we didn't open a new interface, for example, opening
477+
-- files, switching to normal with <c-\><c-n> and opening buffers (#1810)
478+
if utils.fzf_winobj() == nil then
479+
M.__CTX = nil
480+
end
477481
end
478482
return selected
479483
end

0 commit comments

Comments
 (0)