From e8a6110722b3d9cb6611631eeafedddd4f9b4cec Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 19:46:22 +0000 Subject: changes: type next to a mark within the text `no_mark` typed at 0 to 4 into a text of three characters: splicing at 4 is past its end. It types at 0 to 3. --- src/document/changes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/document') diff --git a/src/document/changes.rs b/src/document/changes.rs index 51f9f6f..800ea19 100644 --- a/src/document/changes.rs +++ b/src/document/changes.rs @@ -1419,7 +1419,7 @@ mod tests { // "a". let mut held = ours.fork(); held.apply_changes([marked.clone()]).unwrap(); - for at in 0..=4 { + for at in 0..=3 { let typed = on(&held, |doc| doc.splice_text(&text, at, 0, "x").unwrap()); assert_eq!( Written::default().check(&held, &typed, &typed.decode()), -- cgit v1.3.1