Fix panic in activate_pane_in_direction (#21948)
Ah, invalid SecondaryMap key, we meet again... Release Notes: - Fixed panic when jumping between panes
This commit is contained in:
parent
5d7b6141fd
commit
672fc76832
1 changed files with 7 additions and 5 deletions
|
@ -2960,11 +2960,13 @@ impl Workspace {
|
||||||
match target {
|
match target {
|
||||||
Some(ActivateInDirectionTarget::Pane(pane)) => cx.focus_view(&pane),
|
Some(ActivateInDirectionTarget::Pane(pane)) => cx.focus_view(&pane),
|
||||||
Some(ActivateInDirectionTarget::Dock(dock)) => {
|
Some(ActivateInDirectionTarget::Dock(dock)) => {
|
||||||
if let Some(panel) = dock.read(cx).active_panel() {
|
dock.update(cx, |dock, cx| {
|
||||||
panel.focus_handle(cx).focus(cx);
|
if let Some(panel) = dock.active_panel() {
|
||||||
} else {
|
panel.focus_handle(cx).focus(cx);
|
||||||
log::error!("Could not find a focus target when in switching focus in {direction} direction for a {:?} dock", dock.read(cx).position());
|
} else {
|
||||||
}
|
log::error!("Could not find a focus target when in switching focus in {direction} direction for a {:?} dock", dock.position());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
None => {}
|
None => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue