From c0c59e484deeec89515dfc4be1f1df3854667a14 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Fri, 15 Nov 2024 17:49:54 +0100 Subject: [PATCH] fix(screen): send PaneClosed event to plugins also when closing the whole tab (#3781) --- zellij-server/src/screen.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 174d712c..e04ff35c 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -1081,6 +1081,14 @@ impl Screen { pane_ids.retain(|p| p != suppressed_pane_id); } + let _ = self.bus.senders.send_to_plugin(PluginInstruction::Update( + pane_ids + .iter() + .copied() + .map(|p_id| (None, None, Event::PaneClosed(p_id.into()))) + .collect(), + )); + // below we don't check the result of sending the CloseTab instruction to the pty thread // because this might be happening when the app is closing, at which point the pty thread // has already closed and this would result in an error