Skip to content

Commit

Permalink
don't kill pane when closing copy or search mode overlays
Browse files Browse the repository at this point in the history
I recently introduced this bug when tidying up reaping overlay panes.
  • Loading branch information
wez committed Mar 6, 2021
1 parent 30144ef commit dcb6fec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wezterm-gui/src/termwindow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,13 @@ impl TermWindow {

fn cancel_overlay_for_pane(&self, pane_id: PaneId) {
if let Some(pane) = self.pane_state(pane_id).overlay.take() {
Mux::get().unwrap().remove_pane(pane.pane_id());
// Ungh, when I built the CopyOverlay, its pane doesn't get
// added to the mux and instead it reports the overlaid
// pane id. Take care to avoid killing ourselves off
// when closing the CopyOverlay
if pane_id != pane.pane_id() {
Mux::get().unwrap().remove_pane(pane.pane_id());
}
}
if let Some(window) = self.window.as_ref() {
window.invalidate();
Expand Down

0 comments on commit dcb6fec

Please sign in to comment.