summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index ede122cc8..3c2690a84 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4885,7 +4885,8 @@ do_sub(eap)
++line2;
/* move the cursor to the new line, like Vi */
++curwin->w_cursor.lnum;
- STRCPY(new_start, p1 + 1); /* copy the rest */
+ /* copy the rest */
+ mch_memmove(new_start, p1 + 1, STRLEN(p1 + 1) + 1);
p1 = new_start - 1;
}
}