aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/viml/parser/expressions.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-03 07:30:12 +0800
committerGitHub <noreply@github.com>2022-05-03 07:30:12 +0800
commitcf474021ed44f197da3c67214fcb95a20886799c (patch)
treebff933e965afcb939aaacdad6b44f00eae9a25cf /src/nvim/viml/parser/expressions.c
parentddf7bb24f98b468d2bc6c16c6f300570fc6530f5 (diff)
parent15602a7ce49a2f39666aa6a4f3289683835e83dd (diff)
downloadrneovim-cf474021ed44f197da3c67214fcb95a20886799c.tar.gz
rneovim-cf474021ed44f197da3c67214fcb95a20886799c.tar.bz2
rneovim-cf474021ed44f197da3c67214fcb95a20886799c.zip
Merge pull request #18381 from zeertzjq/vim-8.2.4858
vim-patch:8.2.4858: K_SPECIAL may be escaped twice
Diffstat (limited to 'src/nvim/viml/parser/expressions.c')
-rw-r--r--src/nvim/viml/parser/expressions.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/viml/parser/expressions.c b/src/nvim/viml/parser/expressions.c
index 29d686193d..01fc282891 100644
--- a/src/nvim/viml/parser/expressions.c
+++ b/src/nvim/viml/parser/expressions.c
@@ -1651,10 +1651,11 @@ static void parse_quoted_string(ParserState *const pstate, ExprASTNode *const no
}
switch (*p) {
// A "\<x>" form occupies at least 4 characters, and produces up to
- // 6 characters: reserve space for 2 extra, but do not compute actual
- // length just now, it would be costy.
+ // to 9 characters (6 for the char and 3 for a modifier):
+ // reserve space for 5 extra, but do not compute actual length
+ // just now, it would be costly.
case '<':
- size += 2;
+ size += 5;
break;
// Hexadecimal, always single byte, but at least three bytes each.
case 'x':
@@ -1822,7 +1823,7 @@ static void parse_quoted_string(ParserState *const pstate, ExprASTNode *const no
flags |= FSK_SIMPLIFY;
}
const size_t special_len = trans_special((const char_u **)&p, (size_t)(e - p),
- (char_u *)v_p, flags, NULL);
+ (char_u *)v_p, flags, false, NULL);
if (special_len != 0) {
v_p += special_len;
} else {