From abe91e1efec84c47c03a69ab8a998bb16f628084 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Apr 2022 15:05:56 +0800 Subject: vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifier Problem: GUI tests fail because the test doesn't use a modifier. Solution: Add "\{xxx}" to be able to encode a modifier. https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Change macros to enums to use them in unit tests. --- src/nvim/viml/parser/expressions.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 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 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.: "\" - case '<': { + // Special key, e.g.: "\" 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 { -- cgit