Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtimsb committed Feb 21, 2025
1 parent dd295f6 commit cf0ac80
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/terminal_view/src/terminal_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,22 @@ impl TerminalPanel {
})?
};

if let Some(workspace) = workspace.upgrade() {
terminal_panel
.update_in(&mut cx, |_, window, cx| {
cx.subscribe_in(&workspace, window, |terminal_panel, _, e, window, cx| {
if let workspace::Event::SpawnTask {
action: spawn_in_terminal,
} = e
{
terminal_panel.spawn_task(spawn_in_terminal, window, cx);
};
})
.detach();
})
.ok();
}

// Since panels/docks are loaded outside from the workspace, we cleanup here, instead of through the workspace.
if let Some(workspace) = workspace.upgrade() {
let cleanup_task = workspace.update_in(&mut cx, |workspace, window, cx| {
Expand Down

0 comments on commit cf0ac80

Please sign in to comment.