aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index b37fb1e39d..eab8c58b36 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -6772,7 +6772,7 @@ char_u *reg_submatch(int no)
len = submatch_mmatch->endpos[no].col
- submatch_mmatch->startpos[no].col;
if (round == 2)
- vim_strncpy(retval, s, len);
+ STRLCPY(retval, s, len + 1);
++len;
} else {
/* Multiple lines: take start line from start col, middle