]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.354 v7.2.354
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Feb 2010 14:48:04 +0000 (15:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Feb 2010 14:48:04 +0000 (15:48 +0100)
Problem:    Japanese single-width double-byte characters not handled correctly.
Solution:   Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[].
            (partly by Kikuchan)

src/screen.c
src/version.c

index d461cedeee7bce96811d51bdeb8448a46eeeb09f..7cd72bdce503c2f3177980f43b0c68922bb63de0 100644 (file)
@@ -2335,13 +2335,12 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
                if (cells > 1)
                    ScreenLines[idx + 1] = 0;
            }
-           else if (cells > 1)     /* double-byte character */
-           {
-               if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
-                   ScreenLines2[idx] = p[1];
-               else
-                   ScreenLines[idx + 1] = p[1];
-           }
+           else if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
+               /* double-byte single width character */
+               ScreenLines2[idx] = p[1];
+           else if (cells > 1)
+               /* double-width character */
+               ScreenLines[idx + 1] = p[1];
            col += cells;
            idx += cells;
            p += c_len;
@@ -4631,7 +4630,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
            ScreenLines[off] = c;
 #ifdef FEAT_MBYTE
            if (enc_dbcs == DBCS_JPNU)
+           {
+               if ((mb_c & 0xff00) == 0x8e00)
+                   ScreenLines[off] = 0x8e;
                ScreenLines2[off] = mb_c & 0xff;
+           }
            else if (enc_utf8)
            {
                if (mb_utf8)
index 6b1b88a3297502a3d772b0d104d57165d0146078..bee0e2a15f38e48fb73ba19db5040d62630881d2 100644 (file)
@@ -681,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    354,
 /**/
     353,
 /**/