fix(explorer): call original on_close. Closes #971

This commit is contained in:
Folke Lemaitre 2025-02-06 21:34:14 +01:00
parent cd6e336ec0
commit a0bee9f662
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -46,8 +46,12 @@ function State.new(picker)
end
if opts.watch then
picker.opts.on_close = function()
local on_close = picker.opts.on_close
picker.opts.on_close = function(p)
require("snacks.explorer.watch").abort()
if on_close then
on_close(p)
end
end
end