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 -2
View File
@@ -6,7 +6,8 @@ use gpui::{
geometry::vector::Vector2F,
impl_internal_actions,
keymap::Keystroke,
AppContext, Element, ElementBox, ModelHandle, MutableAppContext, View, ViewContext, ViewHandle,
AnyViewHandle, AppContext, Element, ElementBox, ModelHandle, MutableAppContext, View,
ViewContext, ViewHandle,
};
use workspace::pane;
@@ -190,7 +191,7 @@ impl View for ConnectedView {
.boxed()
}
fn on_focus(&mut self, _cx: &mut ViewContext<Self>) {
fn on_focus_in(&mut self, _: AnyViewHandle, _cx: &mut ViewContext<Self>) {
self.has_new_content = false;
}
+7
View File
@@ -161,6 +161,13 @@ impl Dimensions for TerminalSize {
fn columns(&self) -> usize {
self.num_columns()
}
fn on_focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
cx.emit(Event::Activate);
cx.defer(|view, cx| {
cx.focus(view.content.handle());
});
}
}
#[derive(Error, Debug)]