mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 06:05:19 +00:00
Fully remove panes and update internal data structures
This commit is contained in:
parent
8fd0c9fb0e
commit
9b2d3fcd48
1 changed files with 8 additions and 1 deletions
|
@ -147,7 +147,14 @@ impl SerializedPaneGroup {
|
|||
} else {
|
||||
let pane = pane.upgrade(cx)?;
|
||||
workspace
|
||||
.update(cx, |workspace, cx| workspace.remove_pane(pane, cx))
|
||||
.update(cx, |workspace, cx| {
|
||||
workspace.panes.retain(|p| p != &pane);
|
||||
cx.focus(workspace.panes.last().unwrap());
|
||||
if workspace.last_active_center_pane == Some(pane.downgrade()) {
|
||||
workspace.last_active_center_pane = None;
|
||||
}
|
||||
cx.notify();
|
||||
})
|
||||
.log_err()?;
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue