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

@@ -1815,15 +1815,12 @@ static void parse_quoted_string(ParserState *const pstate, ExprASTNode *const no
*v_p++ = (char)ch;
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;
}
const size_t special_len = trans_special((const char_u **)&p, (size_t)(e - p),
(char_u *)v_p, flags, NULL);