Implement cursor merging

This commit is contained in:
Andras Schmelczer 2025-04-01 22:49:02 +01:00
parent 941100d715
commit 680486c4b5
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 126 additions and 54 deletions

View file

@ -189,7 +189,7 @@ where
affecting_context: &mut MergeContext<T>,
produced_context: &mut MergeContext<T>,
) -> Option<Operation<T>> {
affecting_context.consume_last_operation_if_it_is_too_behind(&self);
affecting_context.consume_last_operation_if_it_is_too_behind(self.start_index() as i64);
let operation = self.with_shifted_index(affecting_context.shift);
match (operation, affecting_context.last_operation()) {