]> granicus.if.org Git - vim/commitdiff
updated for version 7.2a-006 v7.2a.006
authorBram Moolenaar <Bram@vim.org>
Sat, 28 Jun 2008 11:03:50 +0000 (11:03 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 28 Jun 2008 11:03:50 +0000 (11:03 +0000)
src/charset.c
src/version.c

index 282e8573e587f982bad058ac354d0ee47eb503d7..0c9c51136f4ffc53748b56d168a40f5c2080cb42 100644 (file)
@@ -449,13 +449,15 @@ str_foldcase(str, orglen, buf, buflen)
        {
            if (enc_utf8)
            {
-               int     c, lc;
-
-               c = utf_ptr2char(STR_PTR(i));
-               lc = utf_tolower(c);
-               if (c != lc)
+               int     c = utf_ptr2char(STR_PTR(i));
+               int     ol = utf_ptr2len(STR_PTR(i));
+               int     lc = utf_tolower(c);
+
+               /* Only replace the character when it is not an invalid
+                * sequence (ASCII character or more than one byte) and
+                * utf_tolower() doesn't return the original character. */
+               if ((c < 0x80 || ol > 1) && c != lc)
                {
-                   int     ol = utf_char2len(c);
                    int     nl = utf_char2len(lc);
 
                    /* If the byte length changes need to shift the following
index 95d6d54f0be2946275fbfe2fa1f6ca92f1ad69ea..d8a008d78ebcc354e7bde34e23c3165a5933b64c 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    6,
 /**/
     5,
 /**/