Fix cursor movement on shortened deletes and refactor
This commit is contained in:
parent
e2edc076b9
commit
35bb7f2405
4 changed files with 37 additions and 44 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()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ expected: market| placemarket|space
|
|||
parent: A B C D
|
||||
left: A X B D|
|
||||
right: A B Y|
|
||||
expected: A X B Y||
|
||||
expected: A X B |Y|
|
||||
|
||||
---
|
||||
parent: Please submit your assignment by Friday
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue