]>
Commit | Line | Data |
---|---|---|
c0949972 ER |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.116 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.116 | |
11 | Problem: Cannot display Unicode characters above 0x10000. | |
12 | Solution: Remove the replacement with a question mark when UNICODE16 is not | |
13 | defined. (partly by Nicolas Weber) | |
14 | Files: src/screen.c | |
15 | ||
16 | ||
17 | *** ../vim-7.1.115/src/screen.c Thu Aug 30 13:51:52 2007 | |
18 | --- src/screen.c Mon Sep 10 22:29:42 2007 | |
19 | *************** | |
20 | *** 2305,2313 **** | |
21 | --- 2305,2315 ---- | |
22 | prev_c = u8c; | |
23 | #endif | |
24 | /* Non-BMP character: display as ? or fullwidth ?. */ | |
25 | + #ifdef UNICODE16 | |
26 | if (u8c >= 0x10000) | |
27 | ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?'; | |
28 | else | |
29 | + #endif | |
30 | ScreenLinesUC[idx] = u8c; | |
31 | for (i = 0; i < Screen_mco; ++i) | |
32 | { | |
33 | *************** | |
34 | *** 3678,3690 **** | |
35 | if ((mb_l == 1 && c >= 0x80) | |
36 | || (mb_l >= 1 && mb_c == 0) | |
37 | || (mb_l > 1 && (!vim_isprintc(mb_c) | |
38 | ! || mb_c >= 0x10000))) | |
39 | { | |
40 | /* | |
41 | * Illegal UTF-8 byte: display as <xx>. | |
42 | * Non-BMP character : display as ? or fullwidth ?. | |
43 | */ | |
44 | if (mb_c < 0x10000) | |
45 | { | |
46 | transchar_hex(extra, mb_c); | |
47 | # ifdef FEAT_RIGHTLEFT | |
48 | --- 3680,3697 ---- | |
49 | if ((mb_l == 1 && c >= 0x80) | |
50 | || (mb_l >= 1 && mb_c == 0) | |
51 | || (mb_l > 1 && (!vim_isprintc(mb_c) | |
52 | ! # ifdef UNICODE16 | |
53 | ! || mb_c >= 0x10000 | |
54 | ! # endif | |
55 | ! ))) | |
56 | { | |
57 | /* | |
58 | * Illegal UTF-8 byte: display as <xx>. | |
59 | * Non-BMP character : display as ? or fullwidth ?. | |
60 | */ | |
61 | + # ifdef UNICODE16 | |
62 | if (mb_c < 0x10000) | |
63 | + # endif | |
64 | { | |
65 | transchar_hex(extra, mb_c); | |
66 | # ifdef FEAT_RIGHTLEFT | |
67 | *************** | |
68 | *** 3692,3702 **** | |
69 | --- 3699,3711 ---- | |
70 | rl_mirror(extra); | |
71 | # endif | |
72 | } | |
73 | + # ifdef UNICODE16 | |
74 | else if (utf_char2cells(mb_c) != 2) | |
75 | STRCPY(extra, "?"); | |
76 | else | |
77 | /* 0xff1f in UTF-8: full-width '?' */ | |
78 | STRCPY(extra, "\357\274\237"); | |
79 | + # endif | |
80 | ||
81 | p_extra = extra; | |
82 | c = *p_extra; | |
83 | *************** | |
84 | *** 6245,6250 **** | |
85 | --- 6254,6260 ---- | |
86 | else | |
87 | u8c = utfc_ptr2char(ptr, u8cc); | |
88 | mbyte_cells = utf_char2cells(u8c); | |
89 | + # ifdef UNICODE16 | |
90 | /* Non-BMP character: display as ? or fullwidth ?. */ | |
91 | if (u8c >= 0x10000) | |
92 | { | |
93 | *************** | |
94 | *** 6252,6257 **** | |
95 | --- 6262,6268 ---- | |
96 | if (attr == 0) | |
97 | attr = hl_attr(HLF_8); | |
98 | } | |
99 | + # endif | |
100 | # ifdef FEAT_ARABIC | |
101 | if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c)) | |
102 | { | |
103 | *** ../vim-7.1.116/src/version.c Mon Sep 17 22:19:43 2007 | |
104 | --- src/version.c Mon Sep 17 22:37:31 2007 | |
105 | *************** | |
106 | *** 668,669 **** | |
107 | --- 668,671 ---- | |
108 | { /* Add new patch number below this line */ | |
109 | + /**/ | |
110 | + 116, | |
111 | /**/ | |
112 | ||
113 | -- | |
114 | There can't be a crisis today, my schedule is already full. | |
115 | ||
116 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
117 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
118 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
119 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |