Ensure start endpoints always come before end endpoints
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
50afb2d65f
commit
d12387b753
1 changed files with 1 additions and 1 deletions
|
@ -1553,7 +1553,7 @@ impl Snapshot {
|
|||
severity: *severity,
|
||||
});
|
||||
}
|
||||
diagnostic_endpoints.sort_unstable_by_key(|endpoint| endpoint.offset);
|
||||
diagnostic_endpoints.sort_unstable_by_key(|endpoint| (endpoint.offset, !endpoint.is_start));
|
||||
let diagnostic_endpoints = diagnostic_endpoints.into_iter().peekable();
|
||||
|
||||
let chunks = self.text.as_rope().chunks_in_range(range.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue