Add cursor moving #19

Merged
schmelczer merged 23 commits from asch/cursors into main 2025-04-02 22:06:38 +01:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit 89b87efa59 - Show all commits

Fix tests

Andras Schmelczer 2025-04-01 22:50:55 +01:00
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -292,7 +292,7 @@ mod test {
},
CursorPosition {
id: 1,
char_index: 0
char_index: 1
}
]
)
@ -336,18 +336,18 @@ mod test {
TextWithCursors::new(
"that was really complex sample for testing cursor movements",
vec![
CursorPosition {
id: 2,
char_index: 5
}, // unchanged
CursorPosition {
id: 0,
char_index: 9
}, // before "really"
CursorPosition {
id: 1,
char_index: 25
char_index: 23
}, // inside of "s|ample" because "text" got replaced by "sample"
CursorPosition {
id: 2,
char_index: 5
}, // unchanged
CursorPosition {
id: 3,
char_index: 31

View file

@ -23,4 +23,5 @@ EditedText {
operation: <delete ' you? Adam' from index 43>,
},
],
cursors: [],
}