workspace: Fix pane focus transfer when closing another pane (#23175)
Closes #23123 Only close current active_pane should move focus to other pane. Release Notes: - N/A
This commit is contained in:
parent
6f7f0f30e2
commit
994bea0003
1 changed files with 6 additions and 4 deletions
|
@ -4442,10 +4442,12 @@ impl Workspace {
|
|||
if let Some(focus_on) = focus_on {
|
||||
focus_on.update(cx, |pane, cx| window.focus(&pane.focus_handle(cx)));
|
||||
} else {
|
||||
self.panes
|
||||
.last()
|
||||
.unwrap()
|
||||
.update(cx, |pane, cx| window.focus(&pane.focus_handle(cx)));
|
||||
if self.active_pane() == pane {
|
||||
self.panes
|
||||
.last()
|
||||
.unwrap()
|
||||
.update(cx, |pane, cx| window.focus(&pane.focus_handle(cx)));
|
||||
}
|
||||
}
|
||||
if self.last_active_center_pane == Some(pane.downgrade()) {
|
||||
self.last_active_center_pane = None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue