summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-03-22 14:35:05 +0100
committerBram Moolenaar <Bram@vim.org>2011-03-22 14:35:05 +0100
commit0b2f94db2325ed2cbff452eb9373b1ff13f19fce (patch)
treeaa1c5914bbf4c12a51c00d595b65e5ef12b6abe9
parent662db673f9fca628d8e1a7ac4fae3be41dee5d1c (diff)
updated for version 7.3.141v7.3.141
Problem: When a key code is not set get a confusing error message. Solution: Change the error message to say the key code is not set.
-rw-r--r--runtime/doc/options.txt12
-rw-r--r--src/option.c6
-rw-r--r--src/version.c2
3 files changed, 17 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 939a81d007..9b15c58d3f 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -150,6 +150,18 @@ example, if Alt-b produces <Esc>b, use this: >
(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
The advantage over a mapping is that it works in all situations.
+You can define any key codes, e.g.: >
+ :set t_xy=^[foo;
+There is no warning for using a name that isn't recognized. You can map these
+codes as you like: >
+ :map <t_xy> something
+< *E846*
+When a key code is not set, it's like it does not exist. Trying to get its
+value will result in an error: >
+ :set t_kb=
+ :set t_kb
+ E846: Key code not set: t_kb
+
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
diff --git a/src/option.c b/src/option.c
index f1fcd69d0f..b63346637a 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4352,7 +4352,7 @@ do_set(arg, opt_flags)
p = find_termcode(key_name);
if (p == NULL)
{
- errmsg = (char_u *)N_("E518: Unknown option");
+ errmsg = (char_u *)N_("E846: Key code not set");
goto skip;
}
else
@@ -4700,8 +4700,8 @@ do_set(arg, opt_flags)
|| s[i] == ','
|| s[i] == NUL))
break;
- /* Count backspaces. Only a comma with an
- * even number of backspaces before it is
+ /* Count backslashes. Only a comma with an
+ * even number of backslashes before it is
* recognized as a separator */
if (s > origval && s[-1] == '\\')
++bs;
diff --git a/src/version.c b/src/version.c
index d24bf7dba6..3505097fb5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 141,
+/**/
140,
/**/
139,