@@ -20,15 +20,15 @@ wcswidth = sum . map wcwidth
20-- is not true for all terminals then a per-terminal replacement character width needs to be
20-- is not true for all terminals then a per-terminal replacement character width needs to be
21-- implemented.
21-- implemented.
23−-- | Returns the display width of a character. Assumes all characters with unknown widths are 1 width
23+-- | Returns the display width of a character. Assumes all characters with unknown widths are 0 width
24safe_wcwidth :: Char -> Int
24safe_wcwidth :: Char -> Int
25safe_wcwidth c = case wcwidth c of
25safe_wcwidth c = case wcwidth c of
26− i | i < 0 -> 1
26+ i | i < 0 -> 0
27 | otherwise -> i
27 | otherwise -> i
29−-- | Returns the display width of a string. Assumes all characters with unknown widths are 1 width
29+-- | Returns the display width of a string. Assumes all characters with unknown widths are 0 width
30safe_wcswidth :: String -> Int
30safe_wcswidth :: String -> Int
31safe_wcswidth str = case wcswidth str of
31safe_wcswidth str = case wcswidth str of
32− i | i < 0 -> 1
32+ i | i < 0 -> 0
33 | otherwise -> i
33 | otherwise -> i