diff --git a/crates/editor/src/lib.rs b/crates/editor/src/lib.rs index f518253733ffa4bb2a7b095da8eff1248d8c39cf..f97d6166e25d781b7be4624e00a09a068f843c2f 100644 --- a/crates/editor/src/lib.rs +++ b/crates/editor/src/lib.rs @@ -2209,6 +2209,7 @@ impl Editor { let buffer = self.buffer.read(cx.as_ref()); let diagnostic_group_id = dbg!(buffer .diagnostics_in_range::<_, usize>(selection.head()..buffer.len()) + .filter(|(_, diagnostic)| diagnostic.is_primary) .next()) .map(|(_, diagnostic)| diagnostic.group_id);