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.
Editor scroll width is miscalculated when longest line has variable-width characters #2666
Investigating #2659, I realized that we base the scroll width of the editor on the length of the longest line multiplied by the default character width, which is incorrect in the presence of variable-width characters. We need to determine the longest line's length by totaling the real-world width of its characters.
In the example below, I have a js file with a single line containing multiple while keywords. Using Atom Light UI and Inconsolata as my font, the while keywords are bold and have characters that are slightly wider than the default. The result is an inability to scroll to the end of the rendered line.
@lee-dohm Yes, it's a very similar issue. In those cases it's even worse because we're wrapping at 80 characters and I think the JS string length is incorrect in the presence of multi-byte characters. But variable width is also broken for soft wrap. What we really need to do is add up the length of the line based on the width of the on-screen glyphs to which it maps. We need to do a pass on the entire rendering pipeline with multibyte and variable width chars in mind.
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
lee-dohm commentedon Jun 19, 2014
Is this essentially the same root cause as the CJK character issues, #1783, too?
nathansobo commentedon Jun 19, 2014
@lee-dohm Yes, it's a very similar issue. In those cases it's even worse because we're wrapping at 80 characters and I think the JS string length is incorrect in the presence of multi-byte characters. But variable width is also broken for soft wrap. What we really need to do is add up the length of the line based on the width of the on-screen glyphs to which it maps. We need to do a pass on the entire rendering pipeline with multibyte and variable width chars in mind.
lock commentedon Jan 26, 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!