refactor(nvim): ignore the current window for window picker
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m1s

This commit is contained in:
Price Hiller 2024-07-19 09:58:01 -05:00
parent 8f4d72c847
commit 2c77d703fb
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -6,6 +6,7 @@ return {
hint = "floating-big-letter",
---@param window_ids integer[]
filter_func = function(window_ids)
local cur_win = vim.api.nvim_get_current_win()
return vim.iter(window_ids)
:filter(function(win_id)
local win_type = vim.fn.win_gettype(win_id)
@ -14,7 +15,7 @@ return {
"unknown",
"popup",
"command",
}, win_type)
}, win_type) and win_id ~= cur_win
end)
:totable()
end,