Only focus new terminal if the panel contains focus
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
50cfe5eec3
commit
0cf1632d39
1 changed files with 2 additions and 1 deletions
|
@ -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))?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue