-
Notifications
You must be signed in to change notification settings - Fork 29.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
Word wrap get wrong line length while U+2018, U+2019, U+201C, U+201D are present #70627
Comments
(Experimental duplicate detection) |
No, this issue is related to wrong character width calculating which is different from #33236, 2 issues may be occurred at same time. |
I'm sorry but this is not true. You can get the details following these reference links: That the characters are all the same width in your VSCode is possibly because the font you are using sets the characters mentioned above to half-width, but in fact they should be full-width. And there are many characters that are full-width, for example most of the CJK characters like |
The width of the characters
Our current wrapping implementation works OK for fullwidth characters because we measure one as a reference and use the width measured on that one for all fullwidth characters. But we cannot change Let's therefore track in #2654 |
@alexdima Yes you are right about the width of characters like But VSCode seems to treat them as simple Narrow characters and give them halfwidth characters' width regardless the font used and therefore the horizontal scrollbar appears in word wrap mode. To reproduce this issue:
The point is, these characters |
Issue Type: Bug
Word wrap get wrong line length calculated while these characters are present in line:
U+2018[
‘
](Left Single Quotation Mark)U+2019[
’
](Right Single Quotation Mark)U+201C[
“
](Left Double Quotation Mark)U+201D[
”
](Right Double Quotation Mark)These characters are wide characters and should take 2 alphabet characters' width, also known as fullwidth characters, they are different from U+0027' and U+0022["](Quotation Mark) which are narrow characters(halfwidth characters), see references below.
It looks like VSCode calculated these characters as narrow, thus while a long line with 2 or more these characters before wrap position, there will be 1 or more characters stay on the original line so that they are overlapped and covered by scroll bar.
Steps to reproduce this issue:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
References:
Unicode® Standard Annex #11 - EAST ASIAN WIDTH
http://www.unicode.org/reports/tr11/
https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
And, my system is Windows10 x64 Simplified Chinese, I don't know if this is a bug under other systems of other language.
VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763
The text was updated successfully, but these errors were encountered: