summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-05 20:40:03 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-05 20:40:03 +0200
commit63b9173693015b135aad8e3657bef5e7f776787e (patch)
tree562fd413b11ae6a4c45f39538b89ec881aebf2cb /src/syntax.c
parentaf647e76cacc60d3cfc5df3ff5b3d9d4b69b519d (diff)
downloadvim-git-63b9173693015b135aad8e3657bef5e7f776787e.tar.gz
patch 8.2.3297: cannot use all commands inside a {} blockv8.2.3297
Problem: Cannot use all commands inside a {} block after :command and :autocmd. Solution: Do consider \n to separate commands. (closes #8620)
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/syntax.c b/src/syntax.c
index fea317ab3..b3545b37b 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3789,7 +3789,7 @@ syn_cmd_enable(exarg_T *eap, int syncing UNUSED)
static void
syn_cmd_reset(exarg_T *eap, int syncing UNUSED)
{
- eap->nextcmd = check_nextcmd(eap->arg);
+ set_nextcmd(eap, eap->arg);
if (!eap->skip)
{
set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"reset");
@@ -3821,7 +3821,7 @@ syn_cmd_onoff(exarg_T *eap, char *name)
{
char_u buf[100];
- eap->nextcmd = check_nextcmd(eap->arg);
+ set_nextcmd(eap, eap->arg);
if (!eap->skip)
{
STRCPY(buf, "so ");
@@ -3928,7 +3928,7 @@ syn_cmd_list(
arg = skipwhite(arg_end);
}
}
- eap->nextcmd = check_nextcmd(arg);
+ set_nextcmd(eap, arg);
}
static void
@@ -4921,7 +4921,7 @@ error:
}
if (rest != NULL)
- eap->nextcmd = check_nextcmd(rest);
+ set_nextcmd(eap, rest);
else
semsg(_(e_invarg2), arg);
@@ -4978,7 +4978,7 @@ syn_cmd_match(
/*
* Check for trailing command and illegal trailing arguments.
*/
- eap->nextcmd = check_nextcmd(rest);
+ set_nextcmd(eap, rest);
if (!ends_excmd2(eap->cmd, rest) || eap->skip)
rest = NULL;
else if (ga_grow(&curwin->w_s->b_syn_patterns, 1) != FAIL
@@ -5218,7 +5218,7 @@ syn_cmd_region(
* Check for trailing garbage or command.
* If OK, add the item.
*/
- eap->nextcmd = check_nextcmd(rest);
+ set_nextcmd(eap, rest);
if (!ends_excmd(*rest) || eap->skip)
rest = NULL;
else if (ga_grow(&(curwin->w_s->b_syn_patterns), pat_count) != FAIL
@@ -5896,7 +5896,7 @@ syn_cmd_sync(exarg_T *eap, int syncing UNUSED)
semsg(_("E404: Illegal arguments: %s"), arg_start);
else if (!finished)
{
- eap->nextcmd = check_nextcmd(arg_start);
+ set_nextcmd(eap, arg_start);
redraw_curbuf_later(SOME_VALID);
syn_stack_free_all(curwin->w_s); // Need to recompute all syntax.
}