correction: in mbwidth(), use the width of Unicode U+FFFD (Replacement
Character) instead of hardcoding a width of one for unprintable characters git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3103 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
4a8c9b6124
commit
f1a717291b
|
@ -76,9 +76,9 @@ CVS code -
|
||||||
- chars.c:
|
- chars.c:
|
||||||
mbwidth()
|
mbwidth()
|
||||||
- If wcwidth() returns -1 for the character passed in, treat the
|
- If wcwidth() returns -1 for the character passed in, treat the
|
||||||
character as being one column wide instead of zero columns
|
character as having the width of Unicode U+FFFD (Replacement
|
||||||
wide, since there are display problems that crop up with the
|
Character) instead of having zero width, since there are
|
||||||
latter approach. (DLR)
|
display problems that crop up with the latter approach. (DLR)
|
||||||
- files.c:
|
- files.c:
|
||||||
read_file()
|
read_file()
|
||||||
- Remove apparently unneeded logic to handle a case where
|
- Remove apparently unneeded logic to handle a case where
|
||||||
|
|
|
@ -300,7 +300,7 @@ int mbwidth(const char *c)
|
||||||
width = wcwidth(wc);
|
width = wcwidth(wc);
|
||||||
|
|
||||||
if (width == -1)
|
if (width == -1)
|
||||||
width = 1;
|
width = wcwidth(bad_wchar);
|
||||||
|
|
||||||
return width;
|
return width;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue