Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Only focus new terminal if the panel contains focus
Antonio Scandurra0cf1632d39aa
diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rsindex 766736d70e4..2062d2aff31 100644--- a/crates/terminal_view/src/terminal_panel.rs+++ b/crates/terminal_view/src/terminal_panel.rs@@ -236,7 +236,8 @@ impl TerminalPanel {Box::new(cx.add_view(|cx| {TerminalView::new(terminal, workspace.database_id(), cx)}));- Pane::add_item(workspace, &pane, terminal, true, true, None, cx);+ let focus = pane.read(cx).has_focus();+ Pane::add_item(workspace, &pane, terminal, true, focus, None, cx);}})?;this.update(&mut cx, |this, cx| this.serialize(cx))?;