multi_buffer: Fix up some anchor checks (#43454)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-11-25 14:41:19 +01:00
committed by GitHub
parent a359a5a1f2
commit f8965317c3
15 changed files with 154 additions and 58 deletions
@@ -3050,7 +3050,9 @@ async fn test_random_multibuffer(cx: &mut TestAppContext, mut rng: StdRng) {
for _ in 0..10 {
let end_ix = rng.random_range(0..=text_rope.len());
let end_ix = text_rope.floor_char_boundary(end_ix);
let start_ix = rng.random_range(0..=end_ix);
let start_ix = text_rope.floor_char_boundary(start_ix);
assert_eq!(
snapshot
.bytes_in_range(MultiBufferOffset(start_ix)..MultiBufferOffset(end_ix))