mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Fully remove panes and update internal data structures
This commit is contained in:
parent
8fd0c9fb0e
commit
9b2d3fcd48
@ -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 New Issue
Block a user