]> git.wh0rd.org Git - nano.git/commitdiff
cosmetic fix
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 8 Nov 2005 02:27:11 +0000 (02:27 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 8 Nov 2005 02:27:11 +0000 (02:27 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/chars.c

index 8138155c7b43f444c1ab6f686192ed4a54a7c193..373fa3f8841ed6697e3c32e9dab3186c23ae79a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,7 +78,8 @@ CVS code -
        - 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
index 531ffad0ee5bb4affeb2e37f44040bf835e43b35..ef704422832b892099597de67828d3f4ec225cfa 100644 (file)
@@ -299,8 +299,10 @@ int mbwidth(const char *c)
 
        width = wcwidth(wc);
 
-       if (width == -1)
-           width = wcwidth(bad_wchar);
+       if (width == -1) {
+           wc = bad_wchar;
+           width = wcwidth(wc);
+       }
 
        return width;
     } else