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 13:41:19 +00:00
committed by GitHub
parent a359a5a1f2
commit f8965317c3
15 changed files with 154 additions and 58 deletions
@@ -880,10 +880,9 @@ async fn test_random_context_collaboration(cx: &mut TestAppContext, mut rng: Std
let num_sections = rng.random_range(0..=3);
let mut section_start = 0;
for _ in 0..num_sections {
let mut section_end = rng.random_range(section_start..=output_text.len());
while !output_text.is_char_boundary(section_end) {
section_end += 1;
}
let section_end = output_text.floor_char_boundary(
rng.random_range(section_start..=output_text.len()),
);
events.push(Ok(SlashCommandEvent::StartSection {
icon: IconName::Ai,
label: "section".into(),