Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 301 forks source link

incorrect indentation if a unicode char with a number greater than 65536 are present in a file #397

Open koroliov opened 9 years ago

koroliov commented 9 years ago

if a unicode character with a decimal number greater than 65536 is present in a file (in my case I have utf-8 encoding) then white space characters for indentation are shown incorrectly narrow, that is 5 white space characters have width of two.

The unicode char in my case is 𝇚 (U+1D1DA)

My file encoding is utf-8, indentation is 2 white space chars Komodo Edit, version 9.1.0, build 15798, platform linux-x86_64. Built on Sat May 30 05:22:08 2015.

![Uploading komodo_indentation_incorrect.png…]()

Naatan commented 9 years ago

Seems you screenshot didnt upload.

Could you upload a sample file with which we can repro the issue?

koroliov commented 9 years ago

thank you for the reply, sorry for the image. Let me provide a link to another image sharing site, because I had no success in trying to upload it to github. Here is the link

http://postimg.org/image/gf5s7yg8r/

ervumlens commented 9 years ago

Uploaded here for you.

image

koroliov commented 9 years ago

@ervumlens , thank you for the uploading, also I reported wrong ratio for correctly displayed white spaces and incorrect ones. Each 5 white space chars are shown as 2 in my screen shot.

Naatan commented 9 years ago

Reproduced, this looks like a fun one @mitchell-as :P

mitchell-as commented 9 years ago

Bug filed on the Scintilla bug tracker: https://sourceforge.net/p/scintilla/bugs/1748/

mitchell-as commented 9 years ago

Response from Neil: "OK, reproduced by using the plain text lexer. I suspect this is the platform's character shaper since the appearance is the same in gedit. LibreOffice Writer is similar but with a smaller misalignment."

I'm not sure we can fix this one.