Closed ZelnickB closed 5 months ago
I found the solution in #2654. Add "editor.wrappingStrategy": "advanced"
in the settings.json would help, but the rendering speed will be slowed down. So only add this to the specific file formats that uses serif fonts.
Thanks, @Arom1a. This issue does indeed seem to be a duplicate of #2654.
Does this issue occur when all extensions are disabled?
Yes
Version Information
Steps to Reproduce
settings.json
file in an empty profile:The following variations (in any combination) also reproduce the issue:
"editor.fontSize": 14
"editor.fontLigatures": true
"editor.fontFamily"
setting in the top-level object rather than in a language-specific configuration"sans-serif"
as the value foreditor.fontFamily
(rather than specifying specific font names before it)Untitled.md
."editor.wordWrap": "on"
in thesettings.json
file.Expected vs. Actual Behavior
The expected behavior is that the lines wrap at the viewport width, as is the defined behavior for the
"on"
setting foreditor.wordWrap
. This behavior occurs when a monospace font is used:The actual behavior when using a sans-serif font is that the lines wrap to a width much smaller than that of the viewport.
In the second image, it is obvious, for example, that several more words should fit onto the top line before it wraps.
This glitch is particularly frustrating when using a vertical split layout, where space is already limited and it occurs in each pane.
Quick Analysis
At a glance, this doesn't appear to be a CSS problem. Each incorrectly wrapped line is contained in a separate
.view-line
<div>
element, which can be seen by using the developer tools.