mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(picker): don't try showing the preview when the picker is closed. Fixes #714
This commit is contained in:
parent
ce3f42e582
commit
11c0761055
1 changed files with 4 additions and 1 deletions
|
@ -347,10 +347,13 @@ end
|
|||
--- Actual preview code
|
||||
---@hide
|
||||
function M:_show_preview()
|
||||
if self.closed then
|
||||
return
|
||||
end
|
||||
if self.opts.on_change then
|
||||
self.opts.on_change(self, self:current())
|
||||
end
|
||||
if not self.preview.win:valid() then
|
||||
if not (self.preview and self.preview.win:valid()) then
|
||||
return
|
||||
end
|
||||
self.preview:show(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue