Only focus new terminal if the panel contains focus

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio ScandurraandNathan Sobo committed 2023-05-24 16:04:02 +02:00
1 parent 50cfe5eec3
commit 0cf1632d39
1 file changed
+2 -1
+2 -1
View File
@@ -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))?;