@@ -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);
1140+ .sort_unstable_by_key(|diagnostic| diagnostic.range);
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) {