Transfer focus from ProjectDiagnostics view to its editor

This commit is contained in:
Max Brunsfeld 2021-12-16 14:14:22 -08:00
parent 6444fcd442
commit 9cd4e5ba04

View file

@ -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 {