Fixed ":s" message. Docs updates.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index e1d270c..c0668cf 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5176,6 +5176,8 @@
{
if (got_int)
STRCPY(msg_buf, _("(Interrupted) "));
+ else
+ *msg_buf = NUL;
if (sub_nsubs == 1)
vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
"%s", count_only ? _("1 match") : _("1 substitution"));
diff --git a/src/normal.c b/src/normal.c
index 1457883..efcdb79 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5410,6 +5410,7 @@
{
char_u *ptr = NULL;
char_u *buf;
+ char_u *newbuf;
char_u *p;
char_u *kp; /* value of 'keywordprg' */
int kp_help; /* 'keywordprg' is ":help" */
@@ -5562,13 +5563,14 @@
vim_free(buf);
return;
}
- buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
- if (buf == NULL)
+ newbuf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
+ if (newbuf == NULL)
{
vim_free(buf);
vim_free(p);
return;
}
+ buf = newbuf;
STRCAT(buf, p);
vim_free(p);
}