Experimental change to charWidth in Pretty.

Hunch that this might help with #3526.
This commit is contained in:
John MacFarlane 2017-03-22 15:37:08 +01:00
parent 0e68c55955
commit c59e317224

View file

@ -511,6 +511,7 @@ doubleQuotes = inside (char '"') (char '"')
-- | Returns width of a character in a monospace font: 0 for a combining
-- character, 1 for a regular character, 2 for an East Asian wide character.
charWidth :: Char -> Int
charWidth '\r' = 0
charWidth c =
case c of
_ | c < '\x0300' -> 1