aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 2a087276e7..a9766a406e 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -4656,12 +4656,12 @@ static void show_pat_in_path(char_u *line, int type, int did_show, int action, F
*(p + 1) = NUL;
}
if (action == ACTION_SHOW_ALL) {
- sprintf((char *)IObuff, "%3ld: ", count); /* show match nr */
- msg_puts(IObuff);
- sprintf((char *)IObuff, "%4ld", *lnum); /* show line nr */
- /* Highlight line numbers */
- msg_puts_attr(IObuff, hl_attr(HLF_N));
- MSG_PUTS(" ");
+ snprintf((char *)IObuff, IOSIZE, "%3ld: ", count); // Show match nr.
+ msg_puts((const char *)IObuff);
+ snprintf((char *)IObuff, IOSIZE, "%4ld", *lnum); // Show line nr.
+ // Highlight line numbers.
+ msg_puts_attr((const char *)IObuff, hl_attr(HLF_N));
+ msg_puts(" ");
}
msg_prt_line(line, FALSE);
ui_flush(); /* show one line at a time */