aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/viml/parser/expressions.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-26 15:31:29 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-29 15:51:04 +0800
commitd531ef6813919dd6df8ca6927cd99ec3c0a65635 (patch)
tree96d62d121e5744fd7504ff007e6ea025561e83f7 /src/nvim/viml/parser/expressions.c
parentabe91e1efec84c47c03a69ab8a998bb16f628084 (diff)
downloadrneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.tar.gz
rneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.tar.bz2
rneovim-d531ef6813919dd6df8ca6927cd99ec3c0a65635.zip
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. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
Diffstat (limited to 'src/nvim/viml/parser/expressions.c')
-rw-r--r--src/nvim/viml/parser/expressions.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nvim/viml/parser/expressions.c b/src/nvim/viml/parser/expressions.c
index 1beae0d003..b0fbc586b2 100644
--- a/src/nvim/viml/parser/expressions.c
+++ b/src/nvim/viml/parser/expressions.c
@@ -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);