Skip to content

Commit

Permalink
fix: destroy term before stopping signals (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Jul 19, 2024
1 parent d6081fb commit 640efce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yazi-fm/src/app/commands/stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ impl App {
pub(crate) fn stop(&mut self, opt: impl Into<Opt>) {
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.signals.stop(opt.into().tx);
}
}

0 comments on commit 640efce

Please sign in to comment.