]>
Commit | Line | Data |
---|---|---|
9b1d76b7 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.0.203 | |
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.0.203 | |
11 | Problem: 0x80 characters in a register are not handled correctly for the | |
12 | "@" command. | |
13 | Solution: Escape CSI and 0x80 characters. (Yukihiro Nakadaira) | |
14 | Files: src/ops.c | |
15 | ||
16 | ||
17 | *** ../vim-7.0.202/src/ops.c Tue Nov 7 18:43:10 2006 | |
18 | --- src/ops.c Tue Feb 27 17:24:02 2007 | |
19 | *************** | |
20 | *** 96,102 **** | |
21 | #endif | |
22 | static int stuff_yank __ARGS((int, char_u *)); | |
23 | static void put_reedit_in_typebuf __ARGS((int silent)); | |
24 | ! static int put_in_typebuf __ARGS((char_u *s, int colon, int silent)); | |
25 | static void stuffescaped __ARGS((char_u *arg, int literally)); | |
26 | #ifdef FEAT_MBYTE | |
27 | static void mb_adjust_opend __ARGS((oparg_T *oap)); | |
28 | --- 96,103 ---- | |
29 | #endif | |
30 | static int stuff_yank __ARGS((int, char_u *)); | |
31 | static void put_reedit_in_typebuf __ARGS((int silent)); | |
32 | ! static int put_in_typebuf __ARGS((char_u *s, int esc, int colon, | |
33 | ! int silent)); | |
34 | static void stuffescaped __ARGS((char_u *arg, int literally)); | |
35 | #ifdef FEAT_MBYTE | |
36 | static void mb_adjust_opend __ARGS((oparg_T *oap)); | |
37 | *************** | |
38 | *** 1174,1182 **** | |
39 | /* When in Visual mode "'<,'>" will be prepended to the command. | |
40 | * Remove it when it's already there. */ | |
41 | if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) | |
42 | ! retval = put_in_typebuf(p + 5, TRUE, silent); | |
43 | else | |
44 | ! retval = put_in_typebuf(p, TRUE, silent); | |
45 | } | |
46 | vim_free(p); | |
47 | } | |
48 | --- 1175,1183 ---- | |
49 | /* When in Visual mode "'<,'>" will be prepended to the command. | |
50 | * Remove it when it's already there. */ | |
51 | if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0) | |
52 | ! retval = put_in_typebuf(p + 5, TRUE, TRUE, silent); | |
53 | else | |
54 | ! retval = put_in_typebuf(p, TRUE, TRUE, silent); | |
55 | } | |
56 | vim_free(p); | |
57 | } | |
58 | *************** | |
59 | *** 1187,1193 **** | |
60 | p = get_expr_line(); | |
61 | if (p == NULL) | |
62 | return FAIL; | |
63 | ! retval = put_in_typebuf(p, colon, silent); | |
64 | vim_free(p); | |
65 | } | |
66 | #endif | |
67 | --- 1188,1194 ---- | |
68 | p = get_expr_line(); | |
69 | if (p == NULL) | |
70 | return FAIL; | |
71 | ! retval = put_in_typebuf(p, TRUE, colon, silent); | |
72 | vim_free(p); | |
73 | } | |
74 | #endif | |
75 | *************** | |
76 | *** 1199,1205 **** | |
77 | EMSG(_(e_noinstext)); | |
78 | return FAIL; | |
79 | } | |
80 | ! retval = put_in_typebuf(p, colon, silent); | |
81 | vim_free(p); | |
82 | } | |
83 | else | |
84 | --- 1200,1206 ---- | |
85 | EMSG(_(e_noinstext)); | |
86 | return FAIL; | |
87 | } | |
88 | ! retval = put_in_typebuf(p, FALSE, colon, silent); | |
89 | vim_free(p); | |
90 | } | |
91 | else | |
92 | *************** | |
93 | *** 1217,1222 **** | |
94 | --- 1218,1225 ---- | |
95 | put_reedit_in_typebuf(silent); | |
96 | for (i = y_current->y_size; --i >= 0; ) | |
97 | { | |
98 | + char_u *escaped; | |
99 | + | |
100 | /* insert NL between lines and after last line if type is MLINE */ | |
101 | if (y_current->y_type == MLINE || i < y_current->y_size - 1 | |
102 | || addcr) | |
103 | *************** | |
104 | *** 1224,1231 **** | |
105 | if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL) | |
106 | return FAIL; | |
107 | } | |
108 | ! if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent) | |
109 | ! == FAIL) | |
110 | return FAIL; | |
111 | if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent) | |
112 | == FAIL) | |
113 | --- 1227,1238 ---- | |
114 | if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL) | |
115 | return FAIL; | |
116 | } | |
117 | ! escaped = vim_strsave_escape_csi(y_current->y_array[i]); | |
118 | ! if (escaped == NULL) | |
119 | ! return FAIL; | |
120 | ! retval = ins_typebuf(escaped, remap, 0, TRUE, silent); | |
121 | ! vim_free(escaped); | |
122 | ! if (retval == FAIL) | |
123 | return FAIL; | |
124 | if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent) | |
125 | == FAIL) | |
126 | *************** | |
127 | *** 1265,1272 **** | |
128 | } | |
129 | ||
130 | static int | |
131 | ! put_in_typebuf(s, colon, silent) | |
132 | char_u *s; | |
133 | int colon; /* add ':' before the line */ | |
134 | int silent; | |
135 | { | |
136 | --- 1272,1280 ---- | |
137 | } | |
138 | ||
139 | static int | |
140 | ! put_in_typebuf(s, esc, colon, silent) | |
141 | char_u *s; | |
142 | + int esc; /* Escape CSI characters */ | |
143 | int colon; /* add ':' before the line */ | |
144 | int silent; | |
145 | { | |
146 | *************** | |
147 | *** 1276,1282 **** | |
148 | if (colon) | |
149 | retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); | |
150 | if (retval == OK) | |
151 | ! retval = ins_typebuf(s, REMAP_YES, 0, TRUE, silent); | |
152 | if (colon && retval == OK) | |
153 | retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); | |
154 | return retval; | |
155 | --- 1284,1303 ---- | |
156 | if (colon) | |
157 | retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); | |
158 | if (retval == OK) | |
159 | ! { | |
160 | ! char_u *p; | |
161 | ! | |
162 | ! if (esc) | |
163 | ! p = vim_strsave_escape_csi(s); | |
164 | ! else | |
165 | ! p = s; | |
166 | ! if (p == NULL) | |
167 | ! retval = FAIL; | |
168 | ! else | |
169 | ! retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent); | |
170 | ! if (esc) | |
171 | ! vim_free(p); | |
172 | ! } | |
173 | if (colon && retval == OK) | |
174 | retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); | |
175 | return retval; | |
176 | *** ../vim-7.0.202/src/version.c Tue Feb 27 16:51:07 2007 | |
177 | --- src/version.c Tue Feb 27 17:22:13 2007 | |
178 | *************** | |
179 | *** 668,669 **** | |
180 | --- 668,671 ---- | |
181 | { /* Add new patch number below this line */ | |
182 | + /**/ | |
183 | + 203, | |
184 | /**/ | |
185 | ||
186 | -- | |
187 | hundred-and-one symptoms of being an internet addict: | |
188 | 215. Your mouse-clicking forearm rivals Popeye's. | |
189 | ||
190 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
191 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
192 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
193 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |