summaryrefslogtreecommitdiffstats
path: root/src/ex_eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-24 18:37:35 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-24 18:37:35 +0200
commit5409f5d8c95007216ae1190565a7a8ee9ebd7100 (patch)
treecbc94bc8f6560299b6ef2224f526ab53c7534bc6 /src/ex_eval.c
parentb7e2483655d9b68df0c7349918027d800051a28a (diff)
patch 8.2.1047: Vim9: script cannot use line continuation like :def functionv8.2.1047
Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators.
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index a13f844b14..cb32bd0791 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -895,9 +895,12 @@ report_discard_pending(int pending, void *value)
ex_eval(exarg_T *eap)
{
typval_T tv;
+ evalarg_T evalarg;
- if (eval0(eap->arg, &tv, &eap->nextcmd, eap->skip ? 0 : EVAL_EVALUATE)
- == OK)
+ evalarg.eval_flags = eap->skip ? 0 : EVAL_EVALUATE;
+ evalarg.eval_cookie = eap->getline == getsourceline ? eap->cookie : NULL;
+
+ if (eval0(eap->arg, &tv, &eap->nextcmd, &evalarg) == OK)
clear_tv(&tv);
}