diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index a9468ada6c..23f5cc26a5 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -4917,6 +4917,12 @@ impl From> for AnyViewHandle { } } +impl PartialEq> for AnyViewHandle { + fn eq(&self, other: &ViewHandle) -> bool { + self.window_id == other.window_id && self.view_id == other.view_id + } +} + impl Drop for AnyViewHandle { fn drop(&mut self) { self.ref_counts diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 7e56b864bf..cc1d8f0ad2 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1527,7 +1527,7 @@ impl View for Pane { } cx.focus(active_item); - } else { + } else if focused != self.tab_bar_context_menu { self.last_focused_view_by_item .insert(active_item.id(), focused.downgrade()); }