mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
fix(picker): make pick_win work with split layouts. Closes #834
This commit is contained in:
parent
4c06c24e1b
commit
6dbc26757c
3 changed files with 16 additions and 8 deletions
|
@ -372,7 +372,8 @@ function M.pick_win(opts)
|
|||
local chars = "asdfghjkl"
|
||||
local wins = {} ---@type number[]
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
if vim.api.nvim_win_get_config(win).relative == "" then
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
if vim.api.nvim_win_get_config(win).relative == "" and not vim.bo[buf].filetype:find("^snacks") then
|
||||
wins[#wins + 1] = win
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue