Allow `workspace::ActivatePaneInDirection` to navigate out of the terminal panel (#21313)

Haru Kim created

Enhancement for #21238

Release Notes:

- N/A

Change summary

crates/terminal_view/src/terminal_panel.rs | 7 +++++++
1 file changed, 7 insertions(+)

Detailed changes

crates/terminal_view/src/terminal_panel.rs 🔗

@@ -957,6 +957,13 @@ impl Render for TerminalPanel {
                             cx,
                         ) {
                             cx.focus_view(&pane);
+                        } else {
+                            terminal_panel
+                                .workspace
+                                .update(cx, |workspace, cx| {
+                                    workspace.activate_pane_in_direction(action.0, cx)
+                                })
+                                .ok();
                         }
                     })
                 })