diff --git a/docs/changelog.md b/docs/changelog.md index d615ea897..3aa852eee 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -35,6 +35,7 @@ As features stabilize some brief notes about them will accumulate here. * Hyperlink rules with more captures than replacements could panic wezterm when text matched. [#1780](https://github.com/wez/wezterm/issues/1780) * Malformed XTGETTCAP response. [#1781](https://github.com/wez/wezterm/issues/1781) * Multiplexer performance with images was unusuable for all but tiny images. [#1237](https://github.com/wez/wezterm/issues/1237) +* `CloseCurrentPane{confirm=false}` would leave behind a phantom tab/pane when used with the multiplexer. [#1277](https://github.com/wez/wezterm/issues/1277) ### 20220319-142410-0fcdea07 diff --git a/wezterm-client/src/pane/clientpane.rs b/wezterm-client/src/pane/clientpane.rs index 9199c32b0..50663c6d6 100644 --- a/wezterm-client/src/pane/clientpane.rs +++ b/wezterm-client/src/pane/clientpane.rs @@ -381,6 +381,12 @@ impl Pane for ClientPane { .await }) .detach(); + // Explicitly mark ourselves as dead. + // Ideally we'd discover this later when polling the + // status, but killing the pane prevents the server + // side from sending us further data. + // + self.renderable.borrow().inner.borrow_mut().dead = true; } fn mouse_event(&self, event: MouseEvent) -> anyhow::Result<()> {