4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: 0x80 characters in a register are not handled correctly for the
13 Solution: Escape CSI and 0x80 characters. (Yukihiro Nakadaira)
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
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));
27 static void mb_adjust_opend __ARGS((oparg_T *oap));
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,
34 static void stuffescaped __ARGS((char_u *arg, int literally));
36 static void mb_adjust_opend __ARGS((oparg_T *oap));
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);
44 ! retval = put_in_typebuf(p, TRUE, silent);
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);
54 ! retval = put_in_typebuf(p, TRUE, TRUE, silent);
63 ! retval = put_in_typebuf(p, colon, silent);
71 ! retval = put_in_typebuf(p, TRUE, colon, silent);
80 ! retval = put_in_typebuf(p, colon, silent);
88 ! retval = put_in_typebuf(p, FALSE, colon, silent);
95 put_reedit_in_typebuf(silent);
96 for (i = y_current->y_size; --i >= 0; )
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
105 if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL)
108 ! if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent)
111 if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
114 if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL)
117 ! escaped = vim_strsave_escape_csi(y_current->y_array[i]);
118 ! if (escaped == NULL)
120 ! retval = ins_typebuf(escaped, remap, 0, TRUE, silent);
122 ! if (retval == FAIL)
124 if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
131 ! put_in_typebuf(s, colon, silent)
133 int colon; /* add ':' before the line */
140 ! put_in_typebuf(s, esc, colon, silent)
142 + int esc; /* Escape CSI characters */
143 int colon; /* add ':' before the line */
149 retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
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);
157 retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
163 ! p = vim_strsave_escape_csi(s);
169 ! retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent);
173 if (colon && retval == OK)
174 retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
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
181 { /* Add new patch number below this line */
187 hundred-and-one symptoms of being an internet addict:
188 215. Your mouse-clicking forearm rivals Popeye's.
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 ///