Fix a bug where the terminal panel's items wouldn't be hooked up properly to workspace actions

This commit is contained in:
Mikayla Maki 2023-07-11 12:12:37 -07:00
parent 5012d618e6
commit be881369fa
No known key found for this signature in database
3 changed files with 12 additions and 2 deletions

View file

@ -221,6 +221,16 @@ impl TerminalPanel {
pane::Event::ZoomIn => cx.emit(Event::ZoomIn),
pane::Event::ZoomOut => cx.emit(Event::ZoomOut),
pane::Event::Focus => cx.emit(Event::Focus),
pane::Event::AddItem { item } => {
if let Some(workspace) = self.workspace.upgrade(cx) {
let pane = self.pane.clone();
workspace.update(cx, |workspace, cx| {
item.added_to_pane(workspace,pane, cx)
})
}
},
_ => {}
}
}