diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/syntax.c | 11 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index e91ea68891..f47c5eadd3 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -4183,12 +4183,14 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing) break; if (p[1] == NUL) { EMSG2(_("E789: Missing ']': %s"), kw); - kw = p + 2; /* skip over the NUL */ - break; + goto error; } if (p[1] == ']') { - kw = p + 1; /* skip over the "]" */ - break; + if (p[2] != NUL) { + EMSG3(_("E890: trailing char after ']': %s]%s"), + kw, &p[2]); + goto error; + } } if (has_mbyte) { int l = (*mb_ptr2len)(p + 1); @@ -4203,6 +4205,7 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing) } } +error: xfree(keyword_copy); xfree(syn_opt_arg.cont_in_list); xfree(syn_opt_arg.next_list); diff --git a/src/nvim/version.c b/src/nvim/version.c index fc526cc953..2225611779 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -463,7 +463,7 @@ static int included_patches[] = { // 828, // 827, 826, - // 825, + 825, // 824 NA 823, // 822, |