WIP compiling but failing with circular reference
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user