aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 6e08378ad4..c0f08139ec 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2796,9 +2796,10 @@ void ex_append(exarg_T *eap)
p = vim_strchr(eap->nextcmd, NL);
if (p == NULL)
p = eap->nextcmd + STRLEN(eap->nextcmd);
- theline = vim_strnsave(eap->nextcmd, (int)(p - eap->nextcmd));
- if (*p != NUL)
- ++p;
+ theline = vim_strnsave(eap->nextcmd, p - eap->nextcmd);
+ if (*p != NUL) {
+ p++;
+ }
eap->nextcmd = p;
} else {
// Set State to avoid the cursor shape to be set to INSERT mode