Skip to content

Commit ca789c7

Browse files
committed
fix: pick window is shown when no windows to hint
1 parent d3c69b9 commit ca789c7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/window-picker/pickers/window-picker.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ end
4646
function M:pick_window()
4747
local windows = self:_get_windows()
4848

49+
if #windows == 0 then
50+
vim.notify(
51+
'No windows left to pick after filtering',
52+
vim.log.levels.WARN
53+
)
54+
return
55+
end
56+
4957
if self.autoselect_one and #windows == 1 then
5058
return windows[1]
5159
end

0 commit comments

Comments
 (0)