mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-22 21:07:43 +00:00
fix: cursor should be invalidated
This commit is contained in:
parent
9407f52a1d
commit
65d6f4ffe9
1 changed files with 3 additions and 2 deletions
|
@ -96,14 +96,15 @@ impl<'a> Iterator for EffectIter<'a> {
|
|||
id.counter,
|
||||
id.counter + cursor.len as Counter,
|
||||
);
|
||||
// SAFETY: cursor is valid here
|
||||
let content = unsafe { cursor.get_sliced().slice };
|
||||
let changed = self
|
||||
.tracker
|
||||
.update_cursors(smallvec![cursor], StatusChange::SetAsCurrent);
|
||||
assert_eq!(changed as usize, span.len());
|
||||
return Some(Effect::Ins {
|
||||
pos: index,
|
||||
// SAFETY: cursor is valid
|
||||
content: unsafe { cursor.get_sliced().slice },
|
||||
content,
|
||||
});
|
||||
}
|
||||
FirstCursorResult::Del(id, del) => {
|
||||
|
|
Loading…
Reference in a new issue