|
Karsten Hopp |
21c16b |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
21c16b |
Subject: Patch 7.3.141
|
|
Karsten Hopp |
21c16b |
Fcc: outbox
|
|
Karsten Hopp |
21c16b |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
21c16b |
Mime-Version: 1.0
|
|
Karsten Hopp |
21c16b |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
21c16b |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
21c16b |
------------
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
Patch 7.3.141
|
|
Karsten Hopp |
21c16b |
Problem: When a key code is not set get a confusing error message.
|
|
Karsten Hopp |
21c16b |
Solution: Change the error message to say the key code is not set.
|
|
Karsten Hopp |
21c16b |
Files: src/option.c, runtime/doc/options.txt
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
*** ../vim-7.3.140/src/option.c 2011-01-22 00:11:42.000000000 +0100
|
|
Karsten Hopp |
21c16b |
--- src/option.c 2011-03-22 14:25:52.000000000 +0100
|
|
Karsten Hopp |
21c16b |
***************
|
|
Karsten Hopp |
21c16b |
*** 4352,4358 ****
|
|
Karsten Hopp |
21c16b |
p = find_termcode(key_name);
|
|
Karsten Hopp |
21c16b |
if (p == NULL)
|
|
Karsten Hopp |
21c16b |
{
|
|
Karsten Hopp |
21c16b |
! errmsg = (char_u *)N_("E518: Unknown option");
|
|
Karsten Hopp |
21c16b |
goto skip;
|
|
Karsten Hopp |
21c16b |
}
|
|
Karsten Hopp |
21c16b |
else
|
|
Karsten Hopp |
21c16b |
--- 4352,4358 ----
|
|
Karsten Hopp |
21c16b |
p = find_termcode(key_name);
|
|
Karsten Hopp |
21c16b |
if (p == NULL)
|
|
Karsten Hopp |
21c16b |
{
|
|
Karsten Hopp |
21c16b |
! errmsg = (char_u *)N_("E846: Key code not set");
|
|
Karsten Hopp |
21c16b |
goto skip;
|
|
Karsten Hopp |
21c16b |
}
|
|
Karsten Hopp |
21c16b |
else
|
|
Karsten Hopp |
21c16b |
***************
|
|
Karsten Hopp |
21c16b |
*** 4700,4707 ****
|
|
Karsten Hopp |
21c16b |
|| s[i] == ','
|
|
Karsten Hopp |
21c16b |
|| s[i] == NUL))
|
|
Karsten Hopp |
21c16b |
break;
|
|
Karsten Hopp |
21c16b |
! /* Count backspaces. Only a comma with an
|
|
Karsten Hopp |
21c16b |
! * even number of backspaces before it is
|
|
Karsten Hopp |
21c16b |
* recognized as a separator */
|
|
Karsten Hopp |
21c16b |
if (s > origval && s[-1] == '\\')
|
|
Karsten Hopp |
21c16b |
++bs;
|
|
Karsten Hopp |
21c16b |
--- 4700,4707 ----
|
|
Karsten Hopp |
21c16b |
|| s[i] == ','
|
|
Karsten Hopp |
21c16b |
|| s[i] == NUL))
|
|
Karsten Hopp |
21c16b |
break;
|
|
Karsten Hopp |
21c16b |
! /* Count backslashes. Only a comma with an
|
|
Karsten Hopp |
21c16b |
! * even number of backslashes before it is
|
|
Karsten Hopp |
21c16b |
* recognized as a separator */
|
|
Karsten Hopp |
21c16b |
if (s > origval && s[-1] == '\\')
|
|
Karsten Hopp |
21c16b |
++bs;
|
|
Karsten Hopp |
21c16b |
*** ../vim-7.3.140/runtime/doc/options.txt 2010-12-02 21:43:10.000000000 +0100
|
|
Karsten Hopp |
21c16b |
--- runtime/doc/options.txt 2011-03-22 14:32:14.000000000 +0100
|
|
Karsten Hopp |
21c16b |
***************
|
|
Karsten Hopp |
21c16b |
*** 150,155 ****
|
|
Karsten Hopp |
21c16b |
--- 150,167 ----
|
|
Karsten Hopp |
21c16b |
(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
|
|
Karsten Hopp |
21c16b |
The advantage over a mapping is that it works in all situations.
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
+ You can define any key codes, e.g.: >
|
|
Karsten Hopp |
21c16b |
+ :set t_xy=^[foo;
|
|
Karsten Hopp |
21c16b |
+ There is no warning for using a name that isn't recognized. You can map these
|
|
Karsten Hopp |
21c16b |
+ codes as you like: >
|
|
Karsten Hopp |
21c16b |
+ :map <t_xy> something
|
|
Karsten Hopp |
21c16b |
+ < *E846*
|
|
Karsten Hopp |
21c16b |
+ When a key code is not set, it's like it does not exist. Trying to get its
|
|
Karsten Hopp |
21c16b |
+ value will result in an error: >
|
|
Karsten Hopp |
21c16b |
+ :set t_kb=
|
|
Karsten Hopp |
21c16b |
+ :set t_kb
|
|
Karsten Hopp |
21c16b |
+ E846: Key code not set: t_kb
|
|
Karsten Hopp |
21c16b |
+
|
|
Karsten Hopp |
21c16b |
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
|
|
Karsten Hopp |
21c16b |
security reasons.
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
*** ../vim-7.3.140/src/version.c 2011-03-22 13:29:20.000000000 +0100
|
|
Karsten Hopp |
21c16b |
--- src/version.c 2011-03-22 14:32:59.000000000 +0100
|
|
Karsten Hopp |
21c16b |
***************
|
|
Karsten Hopp |
21c16b |
*** 716,717 ****
|
|
Karsten Hopp |
21c16b |
--- 716,719 ----
|
|
Karsten Hopp |
21c16b |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
21c16b |
+ /**/
|
|
Karsten Hopp |
21c16b |
+ 141,
|
|
Karsten Hopp |
21c16b |
/**/
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
--
|
|
Karsten Hopp |
21c16b |
"I know that there are people who don't love their fellow man,
|
|
Karsten Hopp |
21c16b |
and I hate those people!" - Tom Lehrer
|
|
Karsten Hopp |
21c16b |
|
|
Karsten Hopp |
21c16b |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
21c16b |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
21c16b |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
21c16b |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|