mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user