patch 8.2.3961: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
diff --git a/src/match.c b/src/match.c
index 3b5c18e..f1c7442 100644
--- a/src/match.c
+++ b/src/match.c
@@ -69,7 +69,7 @@
}
if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL)
{
- semsg(_(e_invarg2), pat);
+ semsg(_(e_invalid_argument_str), pat);
return -1;
}
@@ -1087,7 +1087,7 @@
if (li->li_tv.v_type != VAR_DICT
|| (d = li->li_tv.vval.v_dict) == NULL)
{
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
return;
}
if (!(dict_find(d, (char_u *)"group", -1) != NULL
@@ -1096,7 +1096,7 @@
&& dict_find(d, (char_u *)"priority", -1) != NULL
&& dict_find(d, (char_u *)"id", -1) != NULL))
{
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
return;
}
li = li->li_next;
@@ -1394,7 +1394,7 @@
{
// There must be two arguments.
vim_free(g);
- semsg(_(e_invarg2), eap->arg);
+ semsg(_(e_invalid_argument_str), eap->arg);
return;
}
end = skip_regexp(p + 1, *p, TRUE);
@@ -1409,7 +1409,7 @@
if (*end != *p)
{
vim_free(g);
- semsg(_(e_invarg2), p);
+ semsg(_(e_invalid_argument_str), p);
return;
}