summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.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/ex_cmds.c
parentaf647e76cacc60d3cfc5df3ff5b3d9d4b69b519d (diff)
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/ex_cmds.c')
-rw-r--r--src/ex_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d9ec4a44b3..d30db91952 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -450,7 +450,7 @@ ex_sort(exarg_T *eap)
unique = TRUE;
else if (*p == '"') // comment start
break;
- else if (check_nextcmd(p) != NULL)
+ else if (eap->nextcmd == NULL && check_nextcmd(p) != NULL)
{
eap->nextcmd = check_nextcmd(p);
break;
@@ -3930,7 +3930,7 @@ ex_substitute(exarg_T *eap)
cmd = skipwhite(cmd);
if (*cmd && *cmd != '"') // if not end-of-line or comment
{
- eap->nextcmd = check_nextcmd(cmd);
+ set_nextcmd(eap, cmd);
if (eap->nextcmd == NULL)
{
semsg(_(e_trailing_arg), cmd);