0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3830: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
This commit is contained in:
Bram Moolenaar
2021-12-16 20:56:57 +00:00
parent 94c785d235
commit e124204c4f
19 changed files with 137 additions and 74 deletions

View File

@@ -906,9 +906,10 @@ call_ufunc(
if (error != FCERR_UNKNOWN)
{
if (error == FCERR_TOOMANY)
semsg(_(e_toomanyarg), ufunc->uf_name);
semsg(_(e_too_many_arguments_for_function_str), ufunc->uf_name);
else
semsg(_(e_toofewarg), ufunc->uf_name);
semsg(_(e_not_enough_arguments_for_function_str),
ufunc->uf_name);
return FAIL;
}
@@ -1106,7 +1107,7 @@ call_partial(
if (res == FAIL)
{
if (called_emsg == called_emsg_before)
semsg(_(e_unknownfunc),
semsg(_(e_unknown_function_str),
name == NULL ? (char_u *)"[unknown]" : name);
return FAIL;
}
@@ -1460,12 +1461,12 @@ call_eval_func(
v = find_var(name, NULL, FALSE);
if (v == NULL)
{
semsg(_(e_unknownfunc), name);
semsg(_(e_unknown_function_str), name);
return FAIL;
}
if (v->di_tv.v_type != VAR_PARTIAL && v->di_tv.v_type != VAR_FUNC)
{
semsg(_(e_unknownfunc), name);
semsg(_(e_unknown_function_str), name);
return FAIL;
}
return call_partial(&v->di_tv, argcount, ectx);