aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/search.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index e1eb7200d7..9756faff33 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -1164,9 +1164,9 @@ int do_search(
if (utf_iscomposing(utf_ptr2char(p))) {
// Use a space to draw the composing char on.
msgbuf[1] = ' ';
- STRNCPY(msgbuf + 2, p, STRLEN(p));
+ memmove(msgbuf + 2, p, STRLEN(p));
} else {
- STRNCPY(msgbuf + 1, p, STRLEN(p));
+ memmove(msgbuf + 1, p, STRLEN(p));
}
if (spats[0].off.line || spats[0].off.end || spats[0].off.off) {
p = msgbuf + STRLEN(p) + 1;
@@ -4280,7 +4280,7 @@ static void search_stat(int dirc, pos_T *pos, char_u *msgbuf)
vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
}
}
- STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
+ memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
if (dirc == '?' && cur == 100) {
cur = -1;
}