diff options
author | mityu <mityu.mail@gmail.com> | 2021-05-28 17:52:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-28 17:52:40 +0200 |
commit | 4ac198c61cb3097d4839d5a697cc8b2b256ac575 (patch) | |
tree | 62d13deb729a4ae10f679ebab6cd0675e3c6cf21 /src/eval.c | |
parent | 2c4a1d0a619b0f1e0f7dac98681da6fee58c6a44 (diff) | |
download | vim-git-4ac198c61cb3097d4839d5a697cc8b2b256ac575.tar.gz |
patch 8.2.2895: Vim9: random characters appear in some error messagesv8.2.2895
Problem: Vim9: random characters appear in some error messages.
Solution: Pass the correct pointer. (closes #8277)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c index f75263d9e..008b032ce 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2358,7 +2358,7 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg) ++*arg; if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[1])) { - error_white_both(p, op_falsy ? 2 : 1); + error_white_both(*arg - (op_falsy ? 1 : 0), op_falsy ? 2 : 1); clear_tv(rettv); return FAIL; } @@ -2406,7 +2406,7 @@ eval1(char_u **arg, typval_T *rettv, evalarg_T *evalarg) */ if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[1])) { - error_white_both(p, 1); + error_white_both(*arg, 1); clear_tv(rettv); evalarg_used->eval_flags = orig_flags; return FAIL; @@ -2511,7 +2511,7 @@ eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg) */ if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2])) { - error_white_both(p, 2); + error_white_both(*arg, 2); clear_tv(rettv); return FAIL; } @@ -2637,7 +2637,7 @@ eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg) */ if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2])) { - error_white_both(p, 2); + error_white_both(*arg, 2); clear_tv(rettv); return FAIL; } @@ -2735,10 +2735,13 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg) ? 0 : (evalarg->eval_flags & EVAL_EVALUATE); if (getnext) + { *arg = eval_next_line(evalarg); + p = *arg; + } else if (evaluate && vim9script && !VIM_ISWHITE(**arg)) { - error_white_both(p, len); + error_white_both(*arg, len); clear_tv(rettv); return FAIL; } @@ -2898,7 +2901,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg) { if (evaluate && vim9script && !VIM_ISWHITE(**arg)) { - error_white_both(p, oplen); + error_white_both(*arg, oplen); clear_tv(rettv); return FAIL; } @@ -3130,7 +3133,7 @@ eval6( { if (evaluate && in_vim9script() && !VIM_ISWHITE(**arg)) { - error_white_both(p, 1); + error_white_both(*arg, 1); clear_tv(rettv); return FAIL; } |