From 640efcee269c5d33e78b99479cd00731cb82f3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20=C2=B7=20Misaki=20Masa?= Date: Fri, 19 Jul 2024 22:41:15 +0800 Subject: [PATCH] fix: destroy term before stopping signals (#1310) --- yazi-fm/src/app/commands/stop.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yazi-fm/src/app/commands/stop.rs b/yazi-fm/src/app/commands/stop.rs index 041bb86a..436eec52 100644 --- a/yazi-fm/src/app/commands/stop.rs +++ b/yazi-fm/src/app/commands/stop.rs @@ -15,7 +15,11 @@ impl App { pub(crate) fn stop(&mut self, opt: impl Into) { 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); } }