diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 6220bfdf..330c7eec 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -246,6 +246,14 @@ return { mode = "search", exclude = { function(win) + local source = picker.opts.source ~= "explorer" and picker.opts.source or nil + local snacks_explorer = require("snacks").picker.get({ source = "explorer" })[1] + local snacks_picker = source and require("snacks").picker.get({ source = source })[1] + local picker_win = snacks_picker and snacks_picker.layout.wins["list"].win + + if snacks_explorer and snacks_picker then + return win ~= picker_win + end return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list" end, },