mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3967: error messages are spread out
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
This commit is contained in:
18
src/eval.c
18
src/eval.c
@@ -997,7 +997,7 @@ get_lval(
|
||||
if (len == 0)
|
||||
{
|
||||
if (!quiet)
|
||||
emsg(_(e_emptykey));
|
||||
emsg(_(e_cannot_use_empty_key_for_dictionary));
|
||||
return NULL;
|
||||
}
|
||||
p = key + len;
|
||||
@@ -1148,7 +1148,7 @@ get_lval(
|
||||
if (lp->ll_dict == get_vimvar_dict()
|
||||
|| &lp->ll_dict->dv_hashtab == get_funccal_args_ht())
|
||||
{
|
||||
semsg(_(e_illvar), name);
|
||||
semsg(_(e_illegal_variable_name_str), name);
|
||||
clear_tv(&var1);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1157,7 +1157,7 @@ get_lval(
|
||||
if (*p == '[' || *p == '.' || unlet)
|
||||
{
|
||||
if (!quiet)
|
||||
semsg(_(e_dictkey), key);
|
||||
semsg(_(e_key_not_present_in_dictionary), key);
|
||||
clear_tv(&var1);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ set_var_lval(
|
||||
|
||||
if (op != NULL && *op != '=')
|
||||
{
|
||||
semsg(_(e_letwrong), op);
|
||||
semsg(_(e_wrong_variable_type_for_str_equal), op);
|
||||
return;
|
||||
}
|
||||
if (value_check_lock(lp->ll_blob->bv_lock, lp->ll_name, FALSE))
|
||||
@@ -1335,7 +1335,7 @@ set_var_lval(
|
||||
if ((flags & (ASSIGN_CONST | ASSIGN_FINAL))
|
||||
&& (flags & ASSIGN_FOR_LOOP) == 0)
|
||||
{
|
||||
emsg(_(e_cannot_mod));
|
||||
emsg(_(e_cannot_modify_existing_variable));
|
||||
*endp = cc;
|
||||
return;
|
||||
}
|
||||
@@ -1401,7 +1401,7 @@ set_var_lval(
|
||||
{
|
||||
if (op != NULL && *op != '=')
|
||||
{
|
||||
semsg(_(e_dictkey), lp->ll_newkey);
|
||||
semsg(_(e_key_not_present_in_dictionary), lp->ll_newkey);
|
||||
return;
|
||||
}
|
||||
if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv,
|
||||
@@ -1590,7 +1590,7 @@ tv_op(typval_T *tv1, typval_T *tv2, char_u *op)
|
||||
}
|
||||
}
|
||||
|
||||
semsg(_(e_letwrong), op);
|
||||
semsg(_(e_wrong_variable_type_for_str_equal), op);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -3248,7 +3248,7 @@ eval6(
|
||||
}
|
||||
else
|
||||
{
|
||||
emsg(_(e_modulus));
|
||||
emsg(_(e_cannot_use_percent_with_float));
|
||||
return FAIL;
|
||||
}
|
||||
rettv->v_type = VAR_FLOAT;
|
||||
@@ -4325,7 +4325,7 @@ eval_index_inner(
|
||||
{
|
||||
if (keylen > 0)
|
||||
key[keylen] = NUL;
|
||||
semsg(_(e_dictkey), key);
|
||||
semsg(_(e_key_not_present_in_dictionary), key);
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user