saros
saros copied to clipboard
Remote edits can remove caret annotations
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.