diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-30 20:55:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-30 20:55:15 +0200 |
commit | 006ad48b8a15c3bace741d8caaf3195e592fbe78 (patch) | |
tree | 638f00ff744ade4f42ee2c1a09636b7c08fbf9d5 /src/eval.c | |
parent | e46a4405056276b4cbdacee76b11f85c8ea1830b (diff) | |
download | vim-git-006ad48b8a15c3bace741d8caaf3195e592fbe78.tar.gz |
patch 8.2.1098: Vim9: cannot use line break in :throw argumentv8.2.1098
Problem: Vim9: cannot use line break in :throw argument.
Solution: Check for line break.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c index 5b69dc736..a98eea34b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -333,10 +333,18 @@ eval_to_string_skip( { typval_T tv; char_u *retval; + evalarg_T evalarg; + CLEAR_FIELD(evalarg); + evalarg.eval_flags = skip ? 0 : EVAL_EVALUATE; + if (eap != NULL && getline_equal(eap->getline, eap->cookie, getsourceline)) + { + evalarg.eval_getline = eap->getline; + evalarg.eval_cookie = eap->cookie; + } if (skip) ++emsg_skip; - if (eval0(arg, &tv, eap, skip ? NULL : &EVALARG_EVALUATE) == FAIL || skip) + if (eval0(arg, &tv, eap, &evalarg) == FAIL || skip) retval = NULL; else { @@ -345,7 +353,7 @@ eval_to_string_skip( } if (skip) --emsg_skip; - clear_evalarg(&EVALARG_EVALUATE, eap); + clear_evalarg(&evalarg, eap); return retval; } |