mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
fix error with reverse range marked text ranges
This commit is contained in:
parent
1f3dc2f534
commit
956dd0c2bc
2 changed files with 4 additions and 1 deletions
|
@ -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>>>();
|
||||||
|
|
|
@ -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_
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue