diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index 4409fa17ad3669806ca1556a83a69d6a5e58fd87..015339e4d3f7697351a2ef77d75bad1d3ef00beb 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -100,7 +100,7 @@ impl View for ProjectDiagnosticsEditor { } fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext) { - if !self.path_states.is_empty() { + if cx.is_self_focused() && !self.path_states.is_empty() { cx.focus(&self.editor); } }