Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Take a `WindowContext` in `StatusItemViewHandle::set_active_pane_item`

Antonio Scandurra060242a28a83
diff --git a/crates/workspace/src/status_bar.rs b/crates/workspace/src/status_bar.rs
index 0a85f3779ce..6007fe48500 100644
--- a/crates/workspace/src/status_bar.rs
+++ b/crates/workspace/src/status_bar.rs
@@ -8,8 +8,8 @@ use gpui::{
vector::{vec2f, Vector2F},
},
json::{json, ToJson},
- AnyViewHandle, AppContext, Element, Entity, SceneBuilder, SizeConstraint, Subscription, View,
- ViewContext, ViewHandle,
+ AnyViewHandle, Element, Entity, SceneBuilder, SizeConstraint, Subscription, View, ViewContext,
+ ViewHandle, WindowContext,
};
use settings::Settings;
@@ -23,7 +23,11 @@ pub trait StatusItemView: View {
trait StatusItemViewHandle {
fn as_any(&self) -> &AnyViewHandle;
- fn set_active_pane_item(&self, active_pane_item: Option<&dyn ItemHandle>, cx: &mut AppContext);
+ fn set_active_pane_item(
+ &self,
+ active_pane_item: Option<&dyn ItemHandle>,
+ cx: &mut WindowContext,
+ );
}
pub struct StatusBar {
@@ -125,7 +129,11 @@ impl<T: StatusItemView> StatusItemViewHandle for ViewHandle<T> {
self
}
- fn set_active_pane_item(&self, active_pane_item: Option<&dyn ItemHandle>, cx: &mut AppContext) {
+ fn set_active_pane_item(
+ &self,
+ active_pane_item: Option<&dyn ItemHandle>,
+ cx: &mut WindowContext,
+ ) {
self.update(cx, |this, cx| {
this.set_active_pane_item(active_pane_item, cx)
});