fix(picker): always stopinsert, even when picker is already closed. Should not be needed, but some plugins misbehave. See #579

This commit is contained in:
Folke Lemaitre 2025-01-19 16:46:52 +01:00
parent 337b054eda
commit 29becb0ecb
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -385,10 +385,10 @@ end
--- Close the picker
function M:close()
vim.cmd.stopinsert()
if self.closed then
return
end
vim.cmd.stopinsert()
self.closed = true
M.last.selected = self:selected({ fallback = false })
M.last.cursor = self.list.cursor