mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-30 22:34:41 +03:00
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
@ -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…
Reference in New Issue
Block a user