You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The drawSelection extension highlights the wrong areas when the cursor is near a block widget. This only happens when the EditorView.lineWrapping extension is enabled.
Describe the issue
Hello 👋
The drawSelection extension highlights the wrong areas when the cursor is near a block widget. This only happens when the
EditorView.lineWrapping
extension is enabled.Some examples of incorrect highlights:
Screen.Recording.2024-04-25.at.2.07.55.PM.mov
I was able to reproduce this issue on:
Browser and platform
No response
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHttaW5pbWFsU2V0dXB9IGZyb20gImNvZGVtaXJyb3IiCmltcG9ydCB7CiAgUmFuZ2VTZXRCdWlsZGVyLAogIFN0YXRlRmllbGQsCn0gZnJvbSAiQGNvZGVtaXJyb3Ivc3RhdGUiOwppbXBvcnQgewogIERlY29yYXRpb24sCiAgRWRpdG9yVmlldywKICBXaWRnZXRUeXBlLAogIGRyYXdTZWxlY3Rpb24KfSBmcm9tICJAY29kZW1pcnJvci92aWV3IjsKCmNsYXNzIE5ld2xpbmVXaWRnZXQgZXh0ZW5kcyBXaWRnZXRUeXBlIHsKICB0b0RPTSgpIHsKICAgIGNvbnN0IGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOwogICAgZGl2LnRleHRDb250ZW50ID0gIi0tLS0tLS0tLS0tIjsKICAgIHJldHVybiBkaXY7CiAgfQp9Cgpjb25zdCBnZXREZWNvcmF0aW9ucyA9ICgpID0+IHsKICBjb25zdCBidWlsZGVyID0gbmV3IFJhbmdlU2V0QnVpbGRlcigpOwogIGNvbnN0IGRlY29yYXRpb24gPSBEZWNvcmF0aW9uLndpZGdldCh7CiAgICB3aWRnZXQ6IG5ldyBOZXdsaW5lV2lkZ2V0KCksCiAgICBibG9jazogdHJ1ZSwKICB9KTsKCiAgYnVpbGRlci5hZGQoMSwgMSwgZGVjb3JhdGlvbik7CiAgYnVpbGRlci5hZGQoOCwgOCwgZGVjb3JhdGlvbik7CiAgcmV0dXJuIGJ1aWxkZXIuZmluaXNoKCk7Cn07Cgpjb25zdCBmaWVsZCA9IFN0YXRlRmllbGQuZGVmaW5lKHsKICBjcmVhdGUoKSB7CiAgICByZXR1cm4gZ2V0RGVjb3JhdGlvbnMoKTsKICB9LAogIHVwZGF0ZShkZWNvcmF0aW9ucykgeyAKICAgIHJldHVybiBkZWNvcmF0aW9ucyAKICB9LAogIHByb3ZpZGU6IChmKSA9PiBFZGl0b3JWaWV3LmRlY29yYXRpb25zLmZyb20oZiksCn0pOwoKbmV3IEVkaXRvclZpZXcoewogIGRvYzogJ3siQSI6IkIifScsCiAgZXh0ZW5zaW9uczogW21pbmltYWxTZXR1cCwKICAgICAgICAgICAgICBmaWVsZCwKICAgICAgICAgICAgICBFZGl0b3JWaWV3LmxpbmVXcmFwcGluZywKICAgICAgICAgICAgICBkcmF3U2VsZWN0aW9uKCldLAogIHBhcmVudDogZG9jdW1lbnQuYm9keQp9KQo=
The text was updated successfully, but these errors were encountered: