summaryrefslogtreecommitdiffstats
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-05-03 21:26:49 +0000
committerBram Moolenaar <Bram@vim.org>2006-05-03 21:26:49 +0000
commit9c102387aff079b513533e93bb2a8109ccc1492c (patch)
tree5dc78df7736efe7105b9e939af9959d9f9f9fd7e /src/getchar.c
parentc05f93ffba24cd678b7f31b40e7b6f64ee12bf74 (diff)
updated for version 7.0g02
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 88e724ff31..7d2cfd786c 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3034,6 +3034,7 @@ do_map(maptype, arg, mode, abbrev)
mapblock_T **map_table;
int unique = FALSE;
int silent = FALSE;
+ int special = FALSE;
#ifdef FEAT_EVAL
int expr = FALSE;
#endif
@@ -3075,6 +3076,16 @@ do_map(maptype, arg, mode, abbrev)
continue;
}
+ /*
+ * Check for "<special>": accept special keys in <>
+ */
+ if (STRNCMP(keys, "<special>", 9) == 0)
+ {
+ keys = skipwhite(keys + 9);
+ special = TRUE;
+ continue;
+ }
+
#ifdef FEAT_EVAL
/*
* Check for "<script>": remap script-local mappings only
@@ -3147,13 +3158,13 @@ do_map(maptype, arg, mode, abbrev)
* replace_termcodes() also removes CTRL-Vs and sometimes backslashes.
*/
if (haskey)
- keys = replace_termcodes(keys, &keys_buf, TRUE, TRUE);
+ keys = replace_termcodes(keys, &keys_buf, TRUE, TRUE, special);
if (hasarg)
{
if (STRICMP(rhs, "<nop>") == 0) /* "<Nop>" means nothing */
rhs = (char_u *)"";
else
- rhs = replace_termcodes(rhs, &arg_buf, FALSE, TRUE);
+ rhs = replace_termcodes(rhs, &arg_buf, FALSE, TRUE, special);
}
#ifdef FEAT_FKMAP
@@ -3819,7 +3830,7 @@ map_to_exists(str, modechars, abbr)
char_u *buf;
int retval;
- rhs = replace_termcodes(str, &buf, FALSE, TRUE);
+ rhs = replace_termcodes(str, &buf, FALSE, TRUE, FALSE);
if (vim_strchr(modechars, 'n') != NULL)
mode |= NORMAL;