mirror of
https://github.com/vim/vim.git
synced 2025-10-29 09:37:35 -04:00
patch 8.2.3961: error messages are spread out
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
This commit is contained in:
10
src/match.c
10
src/match.c
@@ -69,7 +69,7 @@ match_add(
|
||||
}
|
||||
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 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
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 @@ f_setmatches(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
&& 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 @@ ex_match(exarg_T *eap)
|
||||
{
|
||||
// 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 @@ ex_match(exarg_T *eap)
|
||||
if (*end != *p)
|
||||
{
|
||||
vim_free(g);
|
||||
semsg(_(e_invarg2), p);
|
||||
semsg(_(e_invalid_argument_str), p);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user