diff src/ex_eval.c @ 20992:7ee565134d4a v8.2.1047

patch 8.2.1047: Vim9: script cannot use line continuation like :def function Commit: https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 24 18:37:35 2020 +0200 patch 8.2.1047: Vim9: script cannot use line continuation like :def function 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Jun 2020 18:45:04 +0200
parents 9064044fd4f6
children 3af71cbcfdbe
line wrap: on
line diff
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -895,9 +895,12 @@ report_discard_pending(int pending, void
 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);
 }