diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-05 20:40:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-05 20:40:03 +0200 |
commit | 63b9173693015b135aad8e3657bef5e7f776787e (patch) | |
tree | 562fd413b11ae6a4c45f39538b89ec881aebf2cb /src/ex_cmds.c | |
parent | af647e76cacc60d3cfc5df3ff5b3d9d4b69b519d (diff) | |
download | vim-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/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d9ec4a44b..d30db9195 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); |