summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 7ab1c69e52..614ba20805 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -5401,7 +5401,11 @@ separate_nextcmd(exarg_T *eap, int keep_backslash)
&& in_vim9script()
&& !(eap->argt & EX_NOTRLCOM)
&& p > eap->cmd && VIM_ISWHITE(p[-1]))
- || *p == '|' || *p == '\n')
+ || (*p == '|'
+ && eap->cmdidx != CMD_append
+ && eap->cmdidx != CMD_change
+ && eap->cmdidx != CMD_insert)
+ || *p == '\n')
{
/*
* We remove the '\' before the '|', unless EX_CTRLV is used