WIP compiling but failing with circular reference
This commit is contained in:
@@ -6,8 +6,8 @@ use crate::{
|
||||
use collections::HashMap;
|
||||
use editor::{Anchor, Autoscroll, Editor};
|
||||
use gpui::{
|
||||
actions, elements::*, impl_actions, platform::CursorStyle, Action, AppContext, Entity,
|
||||
MouseButton, MutableAppContext, RenderContext, Subscription, Task, View, ViewContext,
|
||||
actions, elements::*, impl_actions, platform::CursorStyle, Action, AnyViewHandle, AppContext,
|
||||
Entity, MouseButton, MutableAppContext, RenderContext, Subscription, Task, View, ViewContext,
|
||||
ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use language::OffsetRangeExt;
|
||||
@@ -80,7 +80,7 @@ impl View for BufferSearchBar {
|
||||
"BufferSearchBar"
|
||||
}
|
||||
|
||||
fn on_focus(&mut self, cx: &mut ViewContext<Self>) {
|
||||
fn on_focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
|
||||
cx.focus(&self.query_editor);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ use crate::{
|
||||
use collections::HashMap;
|
||||
use editor::{Anchor, Autoscroll, Editor, MultiBuffer, SelectAll, MAX_TAB_TITLE_LEN};
|
||||
use gpui::{
|
||||
actions, elements::*, platform::CursorStyle, Action, AppContext, ElementBox, Entity,
|
||||
ModelContext, ModelHandle, MouseButton, MutableAppContext, RenderContext, Subscription, Task,
|
||||
View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle,
|
||||
actions, elements::*, platform::CursorStyle, Action, AnyViewHandle, AppContext, ElementBox,
|
||||
Entity, ModelContext, ModelHandle, MouseButton, MutableAppContext, RenderContext, Subscription,
|
||||
Task, View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle,
|
||||
};
|
||||
use menu::Confirm;
|
||||
use project::{search::SearchQuery, Project};
|
||||
@@ -190,7 +190,7 @@ impl View for ProjectSearchView {
|
||||
}
|
||||
}
|
||||
|
||||
fn on_focus(&mut self, cx: &mut ViewContext<Self>) {
|
||||
fn on_focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
|
||||
let handle = cx.weak_handle();
|
||||
cx.update_global(|state: &mut ActiveSearches, cx| {
|
||||
state
|
||||
|
||||
Reference in New Issue
Block a user