-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Diagnostics' ^~~~ is not aligned properly when error contains 日本語 characters #21492
Comments
Dupe of #8706, I think, although that issue doesn’t directly mention multi-column characters, only zero-column characters. |
Unicode Standard Annex #11 East Asian Width |
I think this is simply an artefact of not handling East Asian Width at all. As such this is not a duplicate of #8706, one of these CJK codepoints would still be one grapheme, but their glyph occupies the room of two "regular" glyphs. This specific case also seems unrelated to East Asian Ambiguous characters, as all characters in the example are East Asian Wide. In general we need a decision on how and how thoroughly to deal with East Asian Width though. |
tl;dr: confirmed that PR fixes this particular issue(/example)
(here it looks unaligned by one char due to github markup?, in edit mode(Write) looks fine, and on console screen too!, on Preview looks one char off) --------- rant about long compile times: I compiled master now (took ~90mins for rust and ~29 mins more for tests) and now I applied your PR and I'm currently waiting (ok it's done now after 118mins ) for the recompile. Someone please tell me where do I donate(to rust devs) to reduce this compile time significantly ? (incremental compilation? or something) The long compile time just, breaks my heart... |
@P1start My point was that counting grapheme clusters instead of "characters" is not sufficient. The |
Shouldn't this be closed due to #21499 ? I mean, it fixes my original issue, unless you guys think that not all cases are handled or something. Reopen if that's the case. (or maybe a new issue should be created for those cases instead) |
Note the misaligned
^~~~~~~
below due to the日本語
characters(their length is not computed properly?):main.rs is this(compiled with
rustc -v main.rs
):tested in
urxvt
andxfce4-terminal
(TERM isrxvt-unicode-256color
respectivelyxterm
)Linux 3.19.0-rc5-gec6f34e
Thank you.
The text was updated successfully, but these errors were encountered: