This commit is contained in:
Mikayla Maki 2023-05-30 16:33:42 -07:00
parent 685e8d7007
commit 0122cd61c5
No known key found for this signature in database
6 changed files with 25 additions and 24 deletions

View file

@ -220,15 +220,16 @@ impl TerminalPanel {
}
}
fn new_terminal(workspace: &mut Workspace, _: &workspace::NewTerminal, cx: &mut ViewContext<Workspace>) {
fn new_terminal(
workspace: &mut Workspace,
_: &workspace::NewTerminal,
cx: &mut ViewContext<Workspace>,
) {
let Some(this) = workspace.focus_panel::<Self>(cx) else {
return;
};
this.update(cx, |this, cx| {
this.add_terminal(cx)
})
this.update(cx, |this, cx| this.add_terminal(cx))
}
fn add_terminal(&mut self, cx: &mut ViewContext<Self>) {