Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal: Fix terminal split pane opening in wrong directory (#39537)
Ngonidzashe Mangudya68e6d555967c
diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rsindex a11e039783e..93abc311549 100644--- a/crates/terminal_view/src/terminal_panel.rs+++ b/crates/terminal_view/src/terminal_panel.rs@@ -449,12 +449,16 @@ impl TerminalPanel {.read(cx).active_item().and_then(|item| item.downcast::<TerminalView>());- let working_directory = terminal_view.as_ref().and_then(|terminal_view| {- let terminal = terminal_view.read(cx).terminal().read(cx);- terminal- .working_directory()- .or_else(|| default_working_directory(workspace, cx))- });+ let working_directory = terminal_view+ .as_ref()+ .and_then(|terminal_view| {+ terminal_view+ .read(cx)+ .terminal()+ .read(cx)+ .working_directory()+ })+ .or_else(|| default_working_directory(workspace, cx));let is_zoomed = active_pane.read(cx).is_zoomed();cx.spawn_in(window, async move |panel, cx| {let terminal = project