Fix cursor movement on shortened deletes and refactor
This commit is contained in:
parent
e2edc076b9
commit
35bb7f2405
4 changed files with 35 additions and 42 deletions
|
|
@ -65,7 +65,7 @@ impl ExampleDocument {
|
|||
for (i, cursor) in text.cursors.iter().enumerate() {
|
||||
assert!(
|
||||
cursor.char_index <= result.len(), // equals in case of insert at the end
|
||||
"Cursor index out of bounds: {} > {}",
|
||||
"Cursor index out of bounds: {} > {} when testing for '{result}'",
|
||||
cursor.char_index,
|
||||
result.len()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue