]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.419
- add patches 7.3.619-743
[packages/vim.git] / 7.3.419
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.419
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.419
11 Problem:    DBCS encoding in a user command does not always work.
12 Solution:   Skip over DBCS characters. (Yasuhiro Matsumoto)
13 Files:      src/ex_docmd.c
14
15
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
18 ***************
19 *** 5967,5973 ****
20             result = STRLEN(eap->arg) + 2;
21             for (p = eap->arg; *p; ++p)
22             {
23 !               if (*p == '\\' || *p == '"')
24                     ++result;
25             }
26   
27 --- 5967,5980 ----
28             result = STRLEN(eap->arg) + 2;
29             for (p = eap->arg; *p; ++p)
30             {
31 ! #ifdef  FEAT_MBYTE
32 !               if (enc_dbcs != 0 && (*mb_ptr2len)(p) == 2)
33 !                   /* DBCS can contain \ in a trail byte, skip the
34 !                    * double-byte character. */
35 !                   ++p;
36 !               else
37 ! #endif
38 !                    if (*p == '\\' || *p == '"')
39                     ++result;
40             }
41   
42 ***************
43 *** 5976,5982 ****
44                 *buf++ = '"';
45                 for (p = eap->arg; *p; ++p)
46                 {
47 !                   if (*p == '\\' || *p == '"')
48                         *buf++ = '\\';
49                     *buf++ = *p;
50                 }
51 --- 5983,5996 ----
52                 *buf++ = '"';
53                 for (p = eap->arg; *p; ++p)
54                 {
55 ! #ifdef  FEAT_MBYTE
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. */
59 !                       *buf++ = *p++;
60 !                   else
61 ! #endif
62 !                        if (*p == '\\' || *p == '"')
63                         *buf++ = '\\';
64                     *buf++ = *p;
65                 }
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
68 ***************
69 *** 716,717 ****
70 --- 716,719 ----
71   {   /* Add new patch number below this line */
72 + /**/
73 +     419,
74   /**/
75
76 -- 
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
79 full of dead monkeys.
80                                 (Scott Adams - The Dilbert principle)
81
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    ///
This page took 0.045749 seconds and 3 git commands to generate.