4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: User command containing 0x80 in multi-byte character does not work
12 properly. (Yasuhiro Matsumoto)
13 Solution: Undo replacement of K_SPECIAL and CSI characters when executing
18 *** ../vim-7.2.089/src/ex_docmd.c Tue Dec 9 11:17:23 2008
19 --- src/ex_docmd.c Wed Jan 28 15:34:19 2009
46 * Replace <> in the command by the arguments.
54 ! while ((start = vim_strchr(p, '<')) != NULL
55 ! && (end = vim_strchr(start + 1, '>')) != NULL)
63 * Replace <> in the command by the arguments.
64 + * First round: "buf" is NULL, compute length, allocate "buf".
65 + * Second round: copy result into "buf".
70 ! p = cmd->uc_rep; /* source */
71 ! q = buf; /* destinateion */
76 + start = vim_strchr(p, '<');
78 + end = vim_strchr(start + 1, '>');
81 + ksp = vim_strchr(p, K_SPECIAL);
82 + if (ksp != NULL && (start == NULL || ksp < start || end == NULL)
83 + && ((ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)
85 + || (ksp[1] == KS_EXTRA && ksp[2] == (int)KE_CSI)
89 + /* K_SPECIAL han been put in the buffer as K_SPECIAL
90 + * KS_SPECIAL KE_FILLER, like for mappings, but
91 + * do_cmdline() doesn't handle that, so convert it back.
92 + * Also change K_SPECIAL KS_EXTRA KE_CSI into CSI. */
96 + mch_memmove(q, p, len);
99 + *q++ = ksp[1] == KS_SPECIAL ? K_SPECIAL : CSI;
105 + /* break if there no <item> is found */
106 + if (start == NULL || end == NULL)
109 /* Include the '>' */
112 *** ../vim-7.2.089/src/version.c Wed Jan 28 14:17:21 2009
113 --- src/version.c Wed Jan 28 15:37:40 2009
117 { /* Add new patch number below this line */
123 How To Keep A Healthy Level Of Insanity:
124 17. When the money comes out the ATM, scream "I won!, I won! 3rd
127 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
128 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
129 \\\ download, build and distribute -- http://www.A-A-P.org ///
130 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///