saros icon indicating copy to clipboard operation
saros copied to clipboard

Remote edits can remove caret annotations

Open tobous opened this issue 5 years ago • 0 comments
trafficstars

The new caret annotation handling in #968 offers the basic logic to display and update caret annotations without a selection (i.e. just the caret).

As the implementation uses selection annotations for this purpose, the logic is not very resistant to remote edits. If another user removes the section of code the caret annotation is currently displayed in, the caret annotation is removed as well. While this handling is fine for selections, it does not make sense for caret annotations as other users can "delete" carets.

A better behavior would be to instead move the position of the caret annotation to the start of the deletion range. This behavior differs from the rest of the annotations as it is also necessary if the annotation is displayed in an editor.

tobous avatar May 05 '20 18:05 tobous