1 To: [email protected] |
|
2 Subject: Patch 7.2.354 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.354 |
|
11 Problem: Japanese single-width double-byte characters not handled correctly. |
|
12 Solution: Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[]. |
|
13 (partly by Kikuchan) |
|
14 Files: src/screen.c |
|
15 |
|
16 |
|
17 *** ../vim-7.2.353/src/screen.c 2010-01-19 17:40:39.000000000 +0100 |
|
18 --- src/screen.c 2010-02-03 15:47:19.000000000 +0100 |
|
19 *************** |
|
20 *** 2335,2347 **** |
|
21 if (cells > 1) |
|
22 ScreenLines[idx + 1] = 0; |
|
23 } |
|
24 ! else if (cells > 1) /* double-byte character */ |
|
25 ! { |
|
26 ! if (enc_dbcs == DBCS_JPNU && *p == 0x8e) |
|
27 ! ScreenLines2[idx] = p[1]; |
|
28 ! else |
|
29 ! ScreenLines[idx + 1] = p[1]; |
|
30 ! } |
|
31 col += cells; |
|
32 idx += cells; |
|
33 p += c_len; |
|
34 --- 2335,2346 ---- |
|
35 if (cells > 1) |
|
36 ScreenLines[idx + 1] = 0; |
|
37 } |
|
38 ! else if (enc_dbcs == DBCS_JPNU && *p == 0x8e) |
|
39 ! /* double-byte single width character */ |
|
40 ! ScreenLines2[idx] = p[1]; |
|
41 ! else if (cells > 1) |
|
42 ! /* double-width character */ |
|
43 ! ScreenLines[idx + 1] = p[1]; |
|
44 col += cells; |
|
45 idx += cells; |
|
46 p += c_len; |
|
47 *************** |
|
48 *** 4631,4637 **** |
|
49 --- 4630,4640 ---- |
|
50 ScreenLines[off] = c; |
|
51 #ifdef FEAT_MBYTE |
|
52 if (enc_dbcs == DBCS_JPNU) |
|
53 + { |
|
54 + if ((mb_c & 0xff00) == 0x8e00) |
|
55 + ScreenLines[off] = 0x8e; |
|
56 ScreenLines2[off] = mb_c & 0xff; |
|
57 + } |
|
58 else if (enc_utf8) |
|
59 { |
|
60 if (mb_utf8) |
|
61 *** ../vim-7.2.353/src/version.c 2010-02-03 15:14:15.000000000 +0100 |
|
62 --- src/version.c 2010-02-03 15:43:43.000000000 +0100 |
|
63 *************** |
|
64 *** 683,684 **** |
|
65 --- 683,686 ---- |
|
66 { /* Add new patch number below this line */ |
|
67 + /**/ |
|
68 + 354, |
|
69 /**/ |
|
70 |
|
71 -- |
|
72 hundred-and-one symptoms of being an internet addict: |
|
73 189. You put your e-mail address in the upper left-hand corner of envelopes. |
|
74 |
|
75 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
76 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
77 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
78 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |
|