Add manual removal code to remove_panes

This commit is contained in:
Mikayla Maki 2023-05-08 17:25:28 -07:00
parent 9b2d3fcd48
commit 49335d017a
No known key found for this signature in database

View File

@ -2459,7 +2459,14 @@ impl Workspace {
self.remove_panes(child.clone(), cx)
}
}
Member::Pane(pane) => self.remove_pane(pane.clone(), cx),
Member::Pane(pane) => {
self.panes.retain(|p| p != &pane);
cx.focus(self.panes.last().unwrap());
if self.last_active_center_pane == Some(pane.downgrade()) {
self.last_active_center_pane = None;
}
cx.notify();
},
}
}