Remote Selection Ribbon Doesn't Match That Remote User's Version
The selection ribbon doesn't fill to the right on the first line of multiple selections, for the remote user.
To Reproduce Steps to reproduce the behavior:
- Use Google Chrome to open demo page in two tabs, put each tab's window side by side, left and right
- Set the following as the editor content:
const i = 10;
const j = i+1;
- On the left tab select from just after the
;on the first line, through to the last;on the second line - You should be seeing something like the following
Expected behavior Ribbon for the remainder of the top line in a remote user's multi-line selection should match what the remote user sees. See rounded rectangle on the right of the above screenshot
Environment Information
- Browser: Chrome
- macOS: macOS Big Sur 11.6
- Versions: Latest demo on https://github.com/yjs/y-codemirror.next
@dmonad Could you give me some pointers to where the logic/data-structures are for the awareness protocol related to text selection?
Hi @seflless, This is located in the y-protocols package.
I fixed this issue in y-codemirror. The fix, however, is quite complicated and required some extensive logic. I'll leave this issue open as I don't think it's too important.