This commit is contained in:
Mikayla Maki 2023-05-22 11:46:52 -07:00
parent e59c8e9d61
commit bafc1d922e
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -105,8 +105,9 @@ impl View for ProjectDiagnosticsEditor {
}
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
if cx.is_self_focused() && !self.path_states.is_empty() {
cx.focus(&self.editor);
dbg!("Focus in");
if dbg!(cx.is_self_focused()) && dbg!(!self.path_states.is_empty()) {
dbg!(cx.focus(&self.editor));
}
}

View file

@ -7180,6 +7180,7 @@ impl View for Editor {
}
fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {
dbg!("Editor Focus in");
if cx.is_self_focused() {
let focused_event = EditorFocused(cx.handle());
cx.emit(Event::Focused);