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
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
incorrect cursor placement on lines with accented characters #5975
There seems to have been a recent regression in the placement of the cursor and end-of-line marker on lines with accented characters. For example
ὤὤὤὤὤὤὤὤὤὤ
Has ten characters but if you ctrl-E to the end of the line the cursor is in the wrong place:
This may seem obscure but is making it very difficult to use Atom for natural language processing applications with non-ASCII character sets. It worked fairly recently so is likely a recent regression.
I suspect the problem can't be reproduced by copy-pasting content here as some Unicode normalization is likely taking place. I have a one-line file that reproduces the problem for me but copy-pasting the content here will likely not work.
In the mean time, let me do a hex dump of the one-line file that exhibits the bug so it's clear exactly what the data on disk is...
0000000 ce ac ce b4 ce b9 ce ba ce ad cf 89 2c 20 ce ac
0000010 ce b4 ce b9 ce ba ce ae cf 83 cf 89 2c 20 e1 bc
0000020 a0 ce b4 ce af ce ba ce b7 cf 83 ce b1 2c 20 e1
0000030 bc a0 ce b4 ce af ce ba ce b7 ce ba ce b1 2c 20
0000040 e1 bc a0 ce b4 ce af ce ba ce b7 ce bc ce b1 ce
0000050 b9 2c 20 e1 bc a0 ce b4 ce b9 ce ba ce ae ce b8
0000060 ce b7 ce bd 0a
0000065
@jtauber Since they are indeed similar, what do you think about adding a comment to that issue with a description of what you're seeing (and a link to the file which reproduces this for you), closing this issue and waiting for a fix for that issue to land? Once it does, we can reopen this if it's not fixed as well.
This is probably the best example I can come up with of the bug and its effect:
the existence of certain diacritics (possibly related to whether they are combining characters) on the alpha makes every glyph on the line narrower (including all those earlier in the line)
the cursor placement ignores this narrowing and the cursor's x offset on the third and later lines is where it would be on the first or second line
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
jtauber commentedon Mar 16, 2015
Actually, it doesn't even need to involve accented characters.
Entering
θν
will place the cursor between θ and ν in 0.187.0
izuzak commentedon Mar 20, 2015
@jtauber I'm having trouble reproducing this in 0.187.0. Can you reproduce this in safe mode? Also, which OS are you using and which font?
Here's what I'm seeing:
jtauber commentedon Mar 20, 2015
OS X 10.10.2 and default font is PT Mono (which doesn't support polytonic Greek so it would be a fall-through font)
jtauber commentedon Mar 20, 2015
I'm going to continue to explore what the reproducible scenario is as if I start a new doc and paste
ὤὤὤὤὤὤὤὤὤὤit works fine for me too :/jtauber commentedon Mar 20, 2015
Until I narrow down the exact scenario, here's a gif of the problem on a real file...
izuzak commentedon Mar 20, 2015
This also reminds me of #1849. Any chance this issue is a duplicate of that?
jtauber commentedon Mar 20, 2015
I suspect the problem can't be reproduced by copy-pasting content here as some Unicode normalization is likely taking place. I have a one-line file that reproduces the problem for me but copy-pasting the content here will likely not work.
jtauber commentedon Mar 20, 2015
It seems entirely plausible this is a duplicate of #1849. If a fix lands for that, I'm happy to validate that it fixes my problem.
jtauber commentedon Mar 20, 2015
In the mean time, let me do a hex dump of the one-line file that exhibits the bug so it's clear exactly what the data on disk is...
izuzak commentedon Mar 20, 2015
@jtauber Since they are indeed similar, what do you think about adding a comment to that issue with a description of what you're seeing (and a link to the file which reproduces this for you), closing this issue and waiting for a fix for that issue to land? Once it does, we can reopen this if it's not fixed as well.
jtauber commentedon Mar 20, 2015
@izuzak sure, I'm happy to do that.
jtauber commentedon Jun 6, 2015
This is probably the best example I can come up with of the bug and its effect:
This is on 0.207.0.
jtauber commentedon Jun 8, 2015
I've reopened this as it really is a separate issue from #1849 and can be fixed independently.
I will verify this is fixed once #6055 and #6083 land.
benogle commentedon Oct 8, 2015
Closing as the new text measurement bits in #6083 are in master
jtauber commentedon Nov 2, 2015
I can verify the problems described here are all resolved in 1.1
lock commentedon Jan 19, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!