text: Implement Rope::clip_offset in terms of the new utf8 boundary methods (#38630)
Release Notes: - N/A
This commit is contained in:
@@ -344,8 +344,8 @@ mod tests {
|
||||
assert_eq!(conflicts_in_range.len(), 1);
|
||||
|
||||
// Test with a range that doesn't include any conflicts
|
||||
let range = buffer.anchor_after(first_conflict_end.to_offset(&buffer) + 1)
|
||||
..buffer.anchor_before(second_conflict_start.to_offset(&buffer) - 1);
|
||||
let range = buffer.anchor_after(first_conflict_end.to_next_offset(&buffer))
|
||||
..buffer.anchor_before(second_conflict_start.to_previous_offset(&buffer));
|
||||
let conflicts_in_range = conflict_snapshot.conflicts_in_range(range, &snapshot);
|
||||
assert_eq!(conflicts_in_range.len(), 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user