diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-11-15 17:49:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-15 17:49:54 +0100 |
| commit | c0c59e484deeec89515dfc4be1f1df3854667a14 (patch) | |
| tree | c71cc6726b82b26295e3317cbcdb1efb9a7c10c4 | |
| parent | docs(changelog): shortcut change (diff) | |
| download | sl0ppij-c0c59e484deeec89515dfc4be1f1df3854667a14.tar.gz sl0ppij-c0c59e484deeec89515dfc4be1f1df3854667a14.tar.xz sl0ppij-c0c59e484deeec89515dfc4be1f1df3854667a14.zip | |
fix(screen): send PaneClosed event to plugins also when closing the whole tab (#3781)
| -rw-r--r-- | zellij-server/src/screen.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
