From d531ef6813919dd6df8ca6927cd99ec3c0a65635 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Apr 2022 15:31:29 +0800 Subject: 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 \ but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec. --- src/nvim/viml/parser/expressions.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/nvim/viml/parser/expressions.c') 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.: "\" or "\{C-W}" - case '<': - case '{': { + // Special key, e.g.: "\" + 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); -- cgit