Transfer focus from ProjectDiagnostics view to its editor

Max Brunsfeld created

Change summary

crates/diagnostics/src/diagnostics.rs | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

crates/diagnostics/src/diagnostics.rs 🔗

@@ -52,6 +52,10 @@ impl View for ProjectDiagnosticsEditor {
     fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
         ChildView::new(self.editor.id()).boxed()
     }
+
+    fn on_focus(&mut self, cx: &mut ViewContext<Self>) {
+        cx.focus(&self.editor);
+    }
 }
 
 impl ProjectDiagnosticsEditor {