Only focus new terminal if the panel contains focus
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
50cfe5eec3
commit
0cf1632d39
@@ -236,7 +236,8 @@ impl TerminalPanel {
|
|||||||
Box::new(cx.add_view(|cx| {
|
Box::new(cx.add_view(|cx| {
|
||||||
TerminalView::new(terminal, workspace.database_id(), 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))?;
|
this.update(&mut cx, |this, cx| this.serialize(cx))?;
|
||||||
|
|||||||
Reference in New Issue
Block a user