Fix incorrect highlighting when an empty range is highlighted via the DisplayMap

Co-Authored-By: Keith Simmons <keith@zed.dev>
This commit is contained in:
Max Brunsfeld
2022-03-23 18:20:55 -07:00
co-authored by Keith Simmons
parent 483a84a7f1
commit ff4bdb3114
4 changed files with 149 additions and 18 deletions
+1 -1
View File
@@ -1156,7 +1156,7 @@ impl Ord for HighlightEndpoint {
fn cmp(&self, other: &Self) -> Ordering {
self.offset
.cmp(&other.offset)
.then_with(|| self.is_start.cmp(&other.is_start))
.then_with(|| other.is_start.cmp(&self.is_start))
}
}