diff options
author | Blaž Hrastnik | 2023-06-26 13:20:20 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-06-26 13:20:20 +0000 |
commit | 8d39a81aa88a813c6a3e1734e5cb3c05fd723839 (patch) | |
tree | ea5ceefbec4e5d38287ee10b79d651fa9c07fa98 | |
parent | b33516fb16df93572ac4ddec1d4079282a2b4b5a (diff) |
fix: Regression from d491e234f4eb4d8c3869f44ab71fedf022dc463e
-rw-r--r-- | helix-view/src/document.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 4140c105..afcd3bff 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1136,6 +1136,9 @@ impl Document { diagnostic.line = self.text.char_to_line(diagnostic.range.start); } + self.diagnostics + .sort_unstable_by_key(|diagnostic| diagnostic.range); + // Update the inlay hint annotations' positions, helping ensure they are displayed in the proper place let apply_inlay_hint_changes = |annotations: &mut Rc<[InlineAnnotation]>| { if let Some(data) = Rc::get_mut(annotations) { |