Fix wrapping

This commit is contained in:
Andras Schmelczer 2025-07-04 02:16:17 +01:00
commit 8004ac3742
3 changed files with 16 additions and 8 deletions

View file

@ -20,7 +20,9 @@ impl TextWithCursors {
debug_assert!(
cursor.char_index <= length,
// cursor.char_index == length means that the cursor is at the end
"Cursor positions must be contained within the text or just after the end"
"Cursor positions ({}) must be contained within the text (of length {length}) or \
just after the end",
cursor.char_index
);
}