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: When a key code is not set get a confusing error message.
12 Solution: Change the error message to say the key code is not set.
13 Files: src/option.c, runtime/doc/options.txt
16 *** ../vim-7.3.140/src/option.c 2011-01-22 00:11:42.000000000 +0100
17 --- src/option.c 2011-03-22 14:25:52.000000000 +0100
20 p = find_termcode(key_name);
23 ! errmsg = (char_u *)N_("E518: Unknown option");
28 p = find_termcode(key_name);
31 ! errmsg = (char_u *)N_("E846: Key code not set");
40 ! /* Count backspaces. Only a comma with an
41 ! * even number of backspaces before it is
42 * recognized as a separator */
43 if (s > origval && s[-1] == '\\')
49 ! /* Count backslashes. Only a comma with an
50 ! * even number of backslashes before it is
51 * recognized as a separator */
52 if (s > origval && s[-1] == '\\')
54 *** ../vim-7.3.140/runtime/doc/options.txt 2010-12-02 21:43:10.000000000 +0100
55 --- runtime/doc/options.txt 2011-03-22 14:32:14.000000000 +0100
59 (the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
60 The advantage over a mapping is that it works in all situations.
62 + You can define any key codes, e.g.: >
64 + There is no warning for using a name that isn't recognized. You can map these
65 + codes as you like: >
66 + :map <t_xy> something
68 + When a key code is not set, it's like it does not exist. Trying to get its
69 + value will result in an error: >
72 + E846: Key code not set: t_kb
74 The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
77 *** ../vim-7.3.140/src/version.c 2011-03-22 13:29:20.000000000 +0100
78 --- src/version.c 2011-03-22 14:32:59.000000000 +0100
82 { /* Add new patch number below this line */
88 "I know that there are people who don't love their fellow man,
89 and I hate those people!" - Tom Lehrer
91 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
92 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
93 \\\ an exciting new programming language -- http://www.Zimbu.org ///
94 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///