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
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
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
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)
26 + vim_str2nr(bp + 5, NULL, &l, TRUE, TRUE, NULL, NULL);
32 if (*bp == '>') /* found matching '>' */
36 /* <Char-123> or <Char-033> or <Char-0x33> */
37 vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n);
39 ! *srcp = end_of_name;
44 - * Modifier with single letter, or special key name.
48 - l = mb_ptr2len(last_dash + 1);
52 - if (modifiers != 0 && last_dash[l + 1] == '>')
53 - key = PTR2CHAR(last_dash + 1);
56 ! key = get_special_key_code(last_dash + 1);
58 ! key = handle_x_keys(key);
64 /* <Char-123> or <Char-033> or <Char-0x33> */
65 vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n);
71 ! * Modifier with single letter, or special key name.
75 ! l = mb_ptr2len(last_dash + 1);
79 ! if (modifiers != 0 && last_dash[l + 1] == '>')
80 ! key = PTR2CHAR(last_dash + 1);
83 ! key = get_special_key_code(last_dash + 1);
85 ! key = handle_x_keys(key);
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
99 :" Test maparg() with a string result
100 :map foo<C-V> is<F4>foo
101 :vnoremap <script> <buffer> <expr> <silent> bar isbar
105 :call append('$', string(maparg('foo<C-V>', '', 0, 1)))
106 :call append('$', string(maparg('bar', '', 0, 1)))
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'))
113 :/^eof/+1,$w! test.out
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
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}
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
131 { /* Add new patch number below this line */
138 No man may purchase alcohol without written consent from his wife.
139 [real standing law in Pennsylvania, United States of America]
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 ///