Preferred line length don't support Chinese!


1 Like

Yes, and the soft wrap don’t support Chinese too

I think that atom count characters as line length. A Chinese character counted as 1, but it takes 2 space actually

I’d recommend opening an issue. I looked a bit into what it would take to fix this, and decided it probably takes more than a couple lines. See below for what I found.

Even Googling for a proper API was hard. Finally I found the API is wcwidth in this Stackoverflow question:

Luckily enough, wcwidth javascript turns up a couple of results: (I don’t recommend it).

Now somebody just needs to use this library to determine line width.
After grepping for softWrap, I’d suggest starting around findWrapColumn, and reviewing uses of length on lines:

While at it, I’m guessing you’ll need to loop over characters. Don’t forget that a Unicode character outside the BMP takes two JavaScript characters, and other fun problems you need to handle.

Hi, I’d like to know the status of this activity.
Is this progressing?
I’m seeing same issue in Japanese.

As @Blaisorblade suggested, I’d recommend opening an Issue. Additionally, if an Issue either already exists or is opened, please paste a link to it back here so that future readers can subscribe to it.

any update to this issue? Using 0.144.0 under Ubuntu 14.04, really unconvenient especially when I open markdown preview window. I lost my cursor every time when I reach end.

As far as I can tell, nobody has created a bug on this. It’s kind of hard for there to be progress if that doesn’t happen.

I have opened the issue @leedohm

1 Like

Yup, sounds like it’s doing a char count rather than a byte count