-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
incorrect spacing in REPL for combining characters #6939
Comments
Also doing |
@aelg, |
We could probably put some kind of noncombining separator after the prompt though to prevent that from happening. |
@stevengj No I understand that, I just thought it was worth mentioning, as it's probably not what anyone would want. It seems related enough, to the bug you reported, to mention it here instead of creating a new issue. |
What should the behavior for navigating across combining characters be?
|
Option 1 sounds good. |
Option 2 sounds better to me. (But I'd still like to have to hit twice to delete the combined character, so that I can delete just the decoration.) But option 1 should be fine for now. Note that utf8proc will identify graphemes for you, if you want to move the cursor in units of graphemes. |
FWIW in vim the behaviour is option 2. I don't know about other editors but it should be easy to test now that all of them implement latex substitution. |
I've been using option 1 for the past 5 minutes and I hate it, so I'll try option 2 now. |
Any by that I mean just navigation. Deletion will still delete the combining character. |
Still doesn't work for me in MacOS 10.8.5 Terminal. Typing |
Odd, let me see. |
Works for me on OS X 10.9.3. What is |
|
|
You must mean OS X 10.8, right, not actually MacOS 8? (MacOS 8 predates Unicode.) |
Ah, that's wrong. Maybe we should include the appropriate table? Last time the policy that @StefanKarpinski proposed on that was "Get a better OS", but maybe now that it's important that's different. |
Haha. I can't be held to every asinine thing I've ever said ;-) |
At least what you said wasn't "arsenate". |
We are already using a replacement (Though it might be a bit out of date; it looks like it needs to be updated for Unicode 6.) |
Or maybe we should just use @jiahao, does the latest REPL handle CJK characters sensibly if they are assigned a charwidth of |
I haven't noticed much craziness with displaying CJK characters. Korean input however relies heavily on combining vowels and consonants (which can be input separately) into syllables (which are rendered as individual characters); those should be doublewidth. |
@jiahao, we might only use our custom |
It would be nice if we could get this from utf8proc, but I don't see a charwidth there at first glance. Of course, first utf8proc has to be updated for Unicode 6, and maybe at the same time its database could be updated to include character widths. (Unfortunately, there is no public version-control repository for utf8proc, although the author told me in February that he was willing to do so, pending some cleanup.) |
Yes, that would be ideal. |
Checks output of charwidth against latest Unicode charcater tables (see UAX #11) Ref: JuliaLang/julia#6939
Hrm. Now some of the super- and sub-script latex characters are behaving funny in the REPL, too. Mac OS 10.9.2 seems to think that all super- and sub-script letters have width 0. Symbols and numbers seem to be ok, though.
I haven't had a chance to figure out when this broke, but I'm pretty sure this worked at one point. |
@mbauman, |
Thinking about this more, I bet a bisect would blame the fix for this issue (953a1d4). These super- and sub-scripts are just collateral damage in making combining characters work properly. |
@mbauman, I don't follow you. The What is happening seems to be that the OS X |
Yup, exactly. It's just that (I think) the REPL didn't honor charwidth until that patch (actually, maybe it was a different patch; I haven't looked closely at the changes). It's the correct behavior… it just stinks that we need to work around buggy implementations. |
Couldn't the |
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
…wcwidth by utf8proc_charwidth (fixes JuliaLang#3721, closes JuliaLang#6939)
If you type e.g.
\alpha<TAB>\hat<TAB>
, it makesα̂
. However, on my machine (MacOS) it displays an extra space after the character, which weirdly disappears when you hit<RETURN>
or<TAB>
.cc: @loladiro
The text was updated successfully, but these errors were encountered: