]> granicus.if.org Git - vim/commitdiff
patch 8.0.0907: with cp932 font names might be misinterpreted v8.0.0907
authorBram Moolenaar <Bram@vim.org>
Fri, 11 Aug 2017 18:55:55 +0000 (20:55 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 11 Aug 2017 18:55:55 +0000 (20:55 +0200)
Problem:    With cp932 font names might be misinterpreted.
Solution:   Do not see "_" as a space when it is the second byte of a double
            byte character. (Ken Takata)

src/os_mswin.c
src/version.c

index 815454955c12ff649589c5178c0d296554b7a109..ef756421fc755f239d4cfa670234611d4a81eeaf 100644 (file)
@@ -2965,7 +2965,9 @@ get_logfont(
        int     did_replace = FALSE;
 
        for (i = 0; lf->lfFaceName[i]; ++i)
-           if (lf->lfFaceName[i] == '_')
+           if (IsDBCSLeadByte(lf->lfFaceName[i]))
+               ++i;
+           else if (lf->lfFaceName[i] == '_')
            {
                lf->lfFaceName[i] = ' ';
                did_replace = TRUE;
index a941d85cbabc8f0d6956834a12d551e024c80356..40515883cef6e48fbc8407791013be3c24966136 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    907,
 /**/
     906,
 /**/