Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix a bug where the terminal panel's items wouldn't be hooked up properly to workspace actions
Mikayla Makibe881369fafc
diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rsindex 11f8f7abde0..2670226e26a 100644--- a/crates/terminal_view/src/terminal_panel.rs+++ b/crates/terminal_view/src/terminal_panel.rs@@ -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)+ })+ }+ },+_ => {}}}diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rsindex c40a1a7ccd3..d1219d53e0d 100644--- a/crates/terminal_view/src/terminal_view.rs+++ b/crates/terminal_view/src/terminal_view.rs@@ -275,7 +275,7 @@ impl TerminalView {cx.spawn(|this, mut cx| async move {Timer::after(CURSOR_BLINK_INTERVAL).await;this.update(&mut cx, |this, cx| this.resume_cursor_blinking(epoch, cx))- .log_err();+ .ok();}).detach();}diff --git a/crates/workspace/src/item.rs b/crates/workspace/src/item.rsindex a3e3ab92999..0c7a478e31a 100644--- a/crates/workspace/src/item.rs+++ b/crates/workspace/src/item.rs@@ -27,7 +27,7 @@ use std::{};use theme::Theme;-#[derive(Eq, PartialEq, Hash)]+#[derive(Eq, PartialEq, Hash, Debug)]pub enum ItemEvent {CloseItem,UpdateTab,