1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: DBCS encoding in a user command does not always work.
12 Solution: Skip over DBCS characters. (Yasuhiro Matsumoto)
16 *** ../vim-7.3.418/src/ex_docmd.c 2011-12-14 14:49:41.000000000 +0100
17 --- src/ex_docmd.c 2012-01-26 20:04:01.000000000 +0100
20 result = STRLEN(eap->arg) + 2;
21 for (p = eap->arg; *p; ++p)
23 ! if (*p == '\\' || *p == '"')
28 result = STRLEN(eap->arg) + 2;
29 for (p = eap->arg; *p; ++p)
32 ! if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
33 ! /* DBCS can contain \ in a trail byte, skip the
34 ! * double-byte character. */
38 ! if (*p == '\\' || *p == '"')
45 for (p = eap->arg; *p; ++p)
47 ! if (*p == '\\' || *p == '"')
53 for (p = eap->arg; *p; ++p)
56 ! if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
57 ! /* DBCS can contain \ in a trail byte, copy the
58 ! * double-byte character to avoid escaping. */
62 ! if (*p == '\\' || *p == '"')
66 *** ../vim-7.3.418/src/version.c 2012-01-26 18:58:25.000000000 +0100
67 --- src/version.c 2012-01-26 20:40:34.000000000 +0100
71 { /* Add new patch number below this line */
77 You have heard the saying that if you put a thousand monkeys in a room with a
78 thousand typewriters and waited long enough, eventually you would have a room
80 (Scott Adams - The Dilbert principle)
82 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
83 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
84 \\\ an exciting new programming language -- http://www.Zimbu.org ///
85 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///