From 643545e91e7b523f076ed146cca032244c9dd1c2 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 18 Nov 2021 16:04:16 +0100 Subject: [PATCH] When showing the next diagnostic, advance to the next *primary* one Co-Authored-By: Nathan Sobo --- crates/editor/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/lib.rs b/crates/editor/src/lib.rs index f518253733..f97d6166e2 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);