- If wcwidth() returns -1 for the character passed in, treat the
character as having the width of Unicode U+FFFD (Replacement
Character) instead of having zero width, since there are
- display problems that crop up with the latter approach. (DLR)
+ display problems that sometimes crop up with the latter
+ approach. (DLR)
- files.c:
read_file()
- Remove apparently unneeded logic to handle a case where
width = wcwidth(wc);
- if (width == -1)
- width = wcwidth(bad_wchar);
+ if (width == -1) {
+ wc = bad_wchar;
+ width = wcwidth(wc);
+ }
return width;
} else