comparison src/eval.c @ 26883:7f150a4936f2 v8.2.3970

patch 8.2.3970: error messages are spread out Commit: https://github.com/vim/vim/commit/74409f62790a93daf0965c71da01ff76aa0fa5a5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 1 15:58:22 2022 +0000 patch 8.2.3970: error messages are spread out Problem: Error messages are spread out. Solution: Move more errors to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jan 2022 17:00:04 +0100
parents 06a137af96f8
children 612339679616
comparison
equal deleted inserted replaced
26882:196f4d7e2a38 26883:7f150a4936f2
854 { 854 {
855 // Don't expand the name when we already know there is an error. 855 // Don't expand the name when we already know there is an error.
856 if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p) 856 if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
857 && *p != '[' && *p != '.') 857 && *p != '[' && *p != '.')
858 { 858 {
859 semsg(_(e_trailing_arg), p); 859 semsg(_(e_trailing_characters_str), p);
860 return NULL; 860 return NULL;
861 } 861 }
862 862
863 lp->ll_exp_name = make_expanded_name(name, expr_start, expr_end, p); 863 lp->ll_exp_name = make_expanded_name(name, expr_start, expr_end, p);
864 if (lp->ll_exp_name == NULL) 864 if (lp->ll_exp_name == NULL)
2267 && called_emsg == called_emsg_before 2267 && called_emsg == called_emsg_before
2268 && (flags & EVAL_CONSTANT) == 0 2268 && (flags & EVAL_CONSTANT) == 0
2269 && (!in_vim9script() || !vim9_bad_comment(p))) 2269 && (!in_vim9script() || !vim9_bad_comment(p)))
2270 { 2270 {
2271 if (end_error) 2271 if (end_error)
2272 semsg(_(e_trailing_arg), p); 2272 semsg(_(e_trailing_characters_str), p);
2273 else 2273 else
2274 semsg(_(e_invalid_expression_str), arg); 2274 semsg(_(e_invalid_expression_str), arg);
2275 } 2275 }
2276 2276
2277 // Some of the expression may not have been consumed. Do not check for 2277 // Some of the expression may not have been consumed. Do not check for
4127 emsg(_(e_cannot_index_a_funcref)); 4127 emsg(_(e_cannot_index_a_funcref));
4128 return FAIL; 4128 return FAIL;
4129 case VAR_FLOAT: 4129 case VAR_FLOAT:
4130 #ifdef FEAT_FLOAT 4130 #ifdef FEAT_FLOAT
4131 if (verbose) 4131 if (verbose)
4132 emsg(_(e_float_as_string)); 4132 emsg(_(e_using_float_as_string));
4133 return FAIL; 4133 return FAIL;
4134 #endif 4134 #endif
4135 case VAR_BOOL: 4135 case VAR_BOOL:
4136 case VAR_SPECIAL: 4136 case VAR_SPECIAL:
4137 case VAR_JOB: 4137 case VAR_JOB: