summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@zimbu.org>2010-02-03 15:48:04 +0100
committerBram Moolenaar <bram@zimbu.org>2010-02-03 15:48:04 +0100
commit7bde514a3344015194b8da8ce976aef3259c9dc6 (patch)
tree1b9623e83af792aa1ff72f633e5677b345862c99
parent637b48f7fdee503746e84bfc1b9262456fed45e0 (diff)
downloadvim-7bde514a3344015194b8da8ce976aef3259c9dc6.tar.gz
updated for version 7.2.354v7.2.354v7-2-354
Problem: Japanese single-width double-byte characters not handled correctly. Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[]. (partly by Kikuchan)
-rw-r--r--src/screen.c17
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/screen.c b/src/screen.c
index d461cede..7cd72bdc 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -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)
diff --git a/src/version.c b/src/version.c
index 6b1b88a3..bee0e2a1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 354,
+/**/
353,
/**/
352,