-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong unicode handling? #22
Comments
Thanks for raising this! Could you share the text from the screenshot, and I'll see if I can reproduce this. |
uh |
🤖 I have created a release *beep* *boop* --- ## [0.1.9](v0.1.8...v0.1.9) (2023-12-10) ### Bug Fixes * typo start position corrected for multiple code point unicode ([e3d2752](e3d2752)), closes [#22](#22) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: potatobot-prime[bot] <132267321+potatobot-prime[bot]@users.noreply.github.com>
I believe you may have overcompensated with your fix, using combining characters such as U+0303 Combining Tilde (with 'e' displays as I don't have permission to reopen this issue; I'd appreciate if you could. Footnotes |
Ah good catch .. I can see |
@tekumara it should render as a single grapheme. However, what's happening here as I understand is that you used Footnotes |
Thanks @emilyyyylime for the really helpful explanation. I've pushed a fix which counts utf-16 code units, since that is the default position encoding. The other position encodings aren't supported yet. |
🤖 I have created a release *beep* *boop* --- ## [0.1.10](v0.1.9...v0.1.10) (2023-12-26) ### Bug Fixes * count positions as utf-16 code units ([de52345](de52345)), closes [#22](#22) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: potatobot-prime[bot] <132267321+potatobot-prime[bot]@users.noreply.github.com>
I'm using Helix, but nothing like this appears to be happening with other LSPs, so I imagine the issue is with Typos.
When a line has multi-byte codepoints, the highlighting appears in the wrong place; seemingly reporting byte offset when a character offset is expected:
The text was updated successfully, but these errors were encountered: