changeset 2678:faf4b09c396e v7.3.097

updated for version 7.3.097 Problem: Using ":call" inside "if 0" does not see that a function returns a Dict and gives error for "." as string concatenation. Solution: Use eval0() to skip over the expression. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Tue, 04 Jan 2011 19:03:27 +0100
parents fea3207b800d
children 763272b18e4f
files src/eval.c src/version.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -3335,6 +3335,15 @@ ex_call(eap)
     int		failed = FALSE;
     funcdict_T	fudi;
 
+    if (eap->skip)
+    {
+	/* trans_function_name() doesn't work well when skipping, use eval0()
+	 * instead to skip to any following command, e.g. for:
+	 *   :if 0 | call dict.foo().bar() | endif  */
+	eval0(eap->arg, &rettv, &eap->nextcmd, FALSE);
+	return;
+    }
+
     tofree = trans_function_name(&arg, eap->skip, TFN_INT, &fudi);
     if (fudi.fd_newkey != NULL)
     {
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    97,
+/**/
     96,
 /**/
     95,