WIP compiling but failing with circular reference

This commit is contained in:
K Simmons
2022-08-09 17:15:52 -07:00
parent 6442ec59e7
commit 690ea57211
22 changed files with 664 additions and 515 deletions
+3 -3
View File
@@ -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);
}
+4 -4
View File
@@ -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