-
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
Implement word wrapping for non monospace fonts #2654
Comments
Indeed, we wrap based on the width of |
@alexandrudima Realistically speaking, is there any chance of this ever getting looked at? Or is the refactoring that this would incur just not worth the cost? Shameless evangelism: Proportional font coding is amazing. Can't understand why more people don't do this. Code is far more readable. Can fit 2x the amount of code on the screen at once. Helps you catch typos easier. And makes my code look so beautiful :) |
@paul-go I've found that using a proportional font lets me focus on the entire keyword/identifier while reading. A monospace font tends to emphasize the individual letter, This is good for APL, but for any language which uses longer keywords/identifiers -- not so much. |
I've specifically found that my horizontal scroll behavior is broken on |
@matsieftw color decorators are not taken into account when computing wrapping points (#32856) |
What does that even mean? My lines wrap fine, VSCode still makes the file super wide so it still has a horizontal scroll. As I asked in my original ticket. I’d like to be able to disable horizontal scrolling since word wrapping and limiting the number of columns does not appear to be an effective way to disable the horizontal scroll bar. |
@matsieftw The computation of the wrapping points (where to break a line) occurs in the view model. The view model is currently unaware of the color decorations (the rectangles with color that are inserted in the line); those color rectangles are inserted after the fact in the view, after the wrapping points have been computed. This is tracked in #32856: |
My file doesn’t have any color decorators. I don’t understand why that’s relevant. I made a ticket because despite having proper word wrapping my files are still super wide and have horizontal scroll. I want to be able to disable the horizontal scroll. The fact that I can scroll entirely past all my text to long blank sections of my lines is annoying. |
@zspitz Yes, you are using a non-monospace font and this is a known issue tracked in this issue. Thank you for the screenshot, but really not needed at this point. @matsieftw I've reopened your issue #59054. Let's continue investigating your precise unique problem there. |
Echoing this here. Is this being worked on at all? Any information about where it is on the priority list? |
Not sure if these should be filed separately, but two other related issues that bug me in VSCode:
|
Comment from #70627. @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 This link provides the width info about the characters' EAST ASIAN WIDTH, and can be of some help. |
To try out, you can use |
It's wrapping at the wrong place. I'm assuming the line measurement is happening based on character counts rather than the sum of the character widths? This doesn't work so well for us proportional font coders ;-)
The text was updated successfully, but these errors were encountered: