Skip to content

Commit

Permalink
fix(fzf-tmux): reuse win object (closes #1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 30, 2024
1 parent b4153da commit 49dcf93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/fzf-lua/win.lua
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,10 @@ function FzfWin:new(o)
-- utils.warn("Please close fzf-lua before starting a new instance")
_self._reuse = true
-- switch to fzf-lua's main window in case the user switched out
vim.api.nvim_set_current_win(_self.fzf_winid)
-- NOTE: `self.fzf_winid == nil` when using fzf-tmux
if _self.fzf_winid and _self.fzf_winid ~= vim.api.nvim_get_current_win() then
vim.api.nvim_set_current_win(_self.fzf_winid)
end
-- refersh treesitter settings as new picker might have it disabled
_self._o.winopts.treesitter = o.winopts.treesitter
return _self
Expand Down

0 comments on commit 49dcf93

Please sign in to comment.