diff options
Diffstat (limited to 'src/nvim/viml/parser/expressions.c')
-rw-r--r-- | src/nvim/viml/parser/expressions.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/nvim/viml/parser/expressions.c b/src/nvim/viml/parser/expressions.c index ec747d56d4..1beae0d003 100644 --- a/src/nvim/viml/parser/expressions.c +++ b/src/nvim/viml/parser/expressions.c @@ -1815,10 +1815,18 @@ static void parse_quoted_string(ParserState *const pstate, ExprASTNode *const no *v_p++ = (char)ch; break; } - // Special key, e.g.: "\<C-W>" - case '<': { + // Special key, e.g.: "\<C-W>" or "\{C-W}" + case '<': + case '{': { + int flags = FSK_KEYCODE | FSK_IN_STRING; + + if (*p == '<') { + 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, true, true, true, NULL); + (char_u *)v_p, flags, NULL); if (special_len != 0) { v_p += special_len; } else { |