vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nice

Problem:    Using \{xxx} for encoding a modifier is not nice.
Solution:   Use \<*xxx> instead, since it's the same as \<xxx> but producing a
            different code.
fccd93f091

Use this notation in langmap_spec.
This commit is contained in:
zeertzjq
2022-04-26 15:31:29 +08:00
parent abe91e1efe
commit d531ef6813
9 changed files with 27 additions and 32 deletions

View File

@@ -4963,15 +4963,12 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
++name;
break;
// Special key, e.g.: "\<C-W>" or "\{C-W}"
case '<':
case '{': {
// Special key, e.g.: "\<C-W>"
case '<': {
int flags = FSK_KEYCODE | FSK_IN_STRING;
if (*p == '<') {
if (p[1] != '*') {
flags |= FSK_SIMPLIFY;
} else {
flags |= FSK_CURLY;
}
extra = trans_special((const char_u **)&p, STRLEN(p), name, flags, NULL);
if (extra != 0) {