mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: destroy term before stopping signals (#1310)
This commit is contained in:
parent
d6081fbe6f
commit
640efcee26
1 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,11 @@ impl App {
|
||||||
pub(crate) fn stop(&mut self, opt: impl Into<Opt>) {
|
pub(crate) fn stop(&mut self, opt: impl Into<Opt>) {
|
||||||
self.cx.manager.active_mut().preview.reset_image();
|
self.cx.manager.active_mut().preview.reset_image();
|
||||||
|
|
||||||
self.signals.stop(opt.into().tx);
|
// We need to destroy the `term` first before stopping the `signals`
|
||||||
|
// to prevent any signal from triggering the term to render again
|
||||||
|
// while the app is being suspended.
|
||||||
self.term = None;
|
self.term = None;
|
||||||
|
|
||||||
|
self.signals.stop(opt.into().tx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue