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
I wonder if it's worth measuring the pixel-width of the initial indent using view.coordsAtPos, rather than using ${numColumns}ch, in order to accommodate variable-width fonts.
Here's a screenshot of my CodeMirror instance for editing Markdown, which uses syntax highlighting with both monospaced and variable-width fonts. The monospaced indent works fine, but with variable-width, we indent too much, because 1ch is wider than a sans-serif blank space.
The text was updated successfully, but these errors were encountered:
I wonder if it's worth measuring the pixel-width of the initial indent using
view.coordsAtPos
, rather than using${numColumns}ch
, in order to accommodate variable-width fonts.Here's a screenshot of my CodeMirror instance for editing Markdown, which uses syntax highlighting with both monospaced and variable-width fonts. The monospaced indent works fine, but with variable-width, we indent too much, because
1ch
is wider than a sans-serif blank space.The text was updated successfully, but these errors were encountered: