fix error with reverse range marked text ranges

This commit is contained in:
Keith Simmons 2022-07-05 16:44:45 -07:00
parent 1f3dc2f534
commit 956dd0c2bc
2 changed files with 4 additions and 1 deletions

View file

@ -96,7 +96,7 @@ pub fn marked_text_ranges_by(
.into_iter() .into_iter()
.zip(ends) .zip(ends)
.map(|(start, end)| { .map(|(start, end)| {
assert!(start >= end, "marked ranges must be disjoint"); assert!(end >= start, "marked ranges must be disjoint");
end..start end..start
}) })
.collect::<Vec<Range<usize>>>(); .collect::<Vec<Range<usize>>>();

View file

@ -1181,4 +1181,7 @@ mod test {
fox jumps|jumps over fox jumps|jumps over
the lazy dog"}); the lazy dog"});
} }
#[gpui::test]
async fn test_
} }