on master help sign in
fix: Regression from d491e234f4eb4d8c3869f44ab71fedf022dc463e
8d39a81Blaž Hrastnik
helix-view/src/document.rs+3
@@ -1136,6 +1136,9 @@ impl Document {
1136 diagnostic.line = self.text.char_to_line(diagnostic.range.start);
1136 diagnostic.line = self.text.char_to_line(diagnostic.range.start);
1137 }
1137 }
1138
1138
1139+ self.diagnostics
1140+ .sort_unstable_by_key(|diagnostic| diagnostic.range);
1141+
1139 // Update the inlay hint annotations' positions, helping ensure they are displayed in the proper place
1142 // Update the inlay hint annotations' positions, helping ensure they are displayed in the proper place
1140 let apply_inlay_hint_changes = |annotations: &mut Rc<[InlineAnnotation]>| {
1143 let apply_inlay_hint_changes = |annotations: &mut Rc<[InlineAnnotation]>| {
1141 if let Some(data) = Rc::get_mut(annotations) {
1144 if let Some(data) = Rc::get_mut(annotations) {