]>
Commit | Line | Data |
---|---|---|
7f1dc7cf | 1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.285 | |
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.285 (after 7.3.284) | |
11 | Problem: Mapping <Char-123> no longer works. | |
12 | Solution: Properly check for "char-". Add a test for it. | |
13 | Files: src/misc2.c, src/testdir/test75.in, src/testdir/test75.ok | |
14 | ||
15 | ||
16 | *** ../vim-7.3.284/src/misc2.c 2011-08-17 20:33:18.000000000 +0200 | |
17 | --- src/misc2.c 2011-08-19 22:08:37.000000000 +0200 | |
18 | *************** | |
19 | *** 2781,2786 **** | |
20 | --- 2781,2792 ---- | |
21 | } | |
22 | if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) | |
23 | bp += 3; /* skip t_xx, xx may be '-' or '>' */ | |
24 | + else if (STRNICMP(bp, "char-", 5) == 0) | |
25 | + { | |
26 | + vim_str2nr(bp + 5, NULL, &l, TRUE, TRUE, NULL, NULL); | |
27 | + bp += l + 5; | |
28 | + break; | |
29 | + } | |
30 | } | |
31 | ||
32 | if (*bp == '>') /* found matching '>' */ | |
33 | *************** | |
34 | *** 2810,2836 **** | |
35 | { | |
36 | /* <Char-123> or <Char-033> or <Char-0x33> */ | |
37 | vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); | |
38 | ! *modp = modifiers; | |
39 | ! *srcp = end_of_name; | |
40 | ! return (int)n; | |
41 | } | |
42 | - | |
43 | - /* | |
44 | - * Modifier with single letter, or special key name. | |
45 | - */ | |
46 | - #ifdef FEAT_MBYTE | |
47 | - if (has_mbyte) | |
48 | - l = mb_ptr2len(last_dash + 1); | |
49 | - else | |
50 | - #endif | |
51 | - l = 1; | |
52 | - if (modifiers != 0 && last_dash[l + 1] == '>') | |
53 | - key = PTR2CHAR(last_dash + 1); | |
54 | else | |
55 | { | |
56 | ! key = get_special_key_code(last_dash + 1); | |
57 | ! if (!keep_x_key) | |
58 | ! key = handle_x_keys(key); | |
59 | } | |
60 | ||
61 | /* | |
62 | --- 2816,2842 ---- | |
63 | { | |
64 | /* <Char-123> or <Char-033> or <Char-0x33> */ | |
65 | vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); | |
66 | ! key = (int)n; | |
67 | } | |
68 | else | |
69 | { | |
70 | ! /* | |
71 | ! * Modifier with single letter, or special key name. | |
72 | ! */ | |
73 | ! #ifdef FEAT_MBYTE | |
74 | ! if (has_mbyte) | |
75 | ! l = mb_ptr2len(last_dash + 1); | |
76 | ! else | |
77 | ! #endif | |
78 | ! l = 1; | |
79 | ! if (modifiers != 0 && last_dash[l + 1] == '>') | |
80 | ! key = PTR2CHAR(last_dash + 1); | |
81 | ! else | |
82 | ! { | |
83 | ! key = get_special_key_code(last_dash + 1); | |
84 | ! if (!keep_x_key) | |
85 | ! key = handle_x_keys(key); | |
86 | ! } | |
87 | } | |
88 | ||
89 | /* | |
90 | *** ../vim-7.3.284/src/testdir/test75.in 2010-10-20 21:22:17.000000000 +0200 | |
91 | --- src/testdir/test75.in 2011-08-19 22:05:13.000000000 +0200 | |
92 | *************** | |
93 | *** 2,7 **** | |
94 | --- 2,8 ---- | |
95 | ||
96 | STARTTEST | |
97 | :so small.vim | |
98 | + :set cpo-=< | |
99 | :" Test maparg() with a string result | |
100 | :map foo<C-V> is<F4>foo | |
101 | :vnoremap <script> <buffer> <expr> <silent> bar isbar | |
102 | *************** | |
103 | *** 9,14 **** | |
104 | --- 10,20 ---- | |
105 | :call append('$', string(maparg('foo<C-V>', '', 0, 1))) | |
106 | :call append('$', string(maparg('bar', '', 0, 1))) | |
107 | :" | |
108 | + :map abc x<char-114>x | |
109 | + :call append('$', maparg('abc')) | |
110 | + :map abc y<S-char-114>y | |
111 | + :call append('$', maparg('abc')) | |
112 | + :" | |
113 | :/^eof/+1,$w! test.out | |
114 | :qa! | |
115 | ENDTEST | |
116 | *** ../vim-7.3.284/src/testdir/test75.ok 2010-10-20 21:22:17.000000000 +0200 | |
117 | --- src/testdir/test75.ok 2011-08-19 21:53:26.000000000 +0200 | |
118 | *************** | |
119 | *** 1,3 **** | |
120 | --- 1,5 ---- | |
121 | is<F4>foo | |
122 | {'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>', 'mode': ' ', 'expr': 0, 'sid': 0, 'rhs': 'is<F4>foo', 'buffer': 0} | |
123 | {'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v', 'expr': 1, 'sid': 0, 'rhs': 'isbar', 'buffer': 1} | |
124 | + xrx | |
125 | + yRy | |
126 | *** ../vim-7.3.284/src/version.c 2011-08-17 20:33:18.000000000 +0200 | |
127 | --- src/version.c 2011-08-19 22:15:22.000000000 +0200 | |
128 | *************** | |
129 | *** 711,712 **** | |
130 | --- 711,714 ---- | |
131 | { /* Add new patch number below this line */ | |
132 | + /**/ | |
133 | + 285, | |
134 | /**/ | |
135 | ||
136 | ||
137 | -- | |
138 | No man may purchase alcohol without written consent from his wife. | |
139 | [real standing law in Pennsylvania, United States of America] | |
140 | ||
141 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
142 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
143 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
144 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |