fix(picker): nil on :quit. Closes #1107

This commit is contained in:
Folke Lemaitre 2025-02-13 12:07:55 +01:00
parent bbac7ffda1
commit 1219f5e43b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -161,7 +161,7 @@ end
---@return string? name, snacks.win? win
function M:current_win()
local current = vim.api.nvim_get_current_win()
for w, win in pairs(self.layout.wins) do
for w, win in pairs(self.layout.wins or {}) do
if win.win == current then
return w, win
end