]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.097 v7.3.097
authorBram Moolenaar <Bram@vim.org>
Tue, 4 Jan 2011 18:03:27 +0000 (19:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 4 Jan 2011 18:03:27 +0000 (19:03 +0100)
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)

src/eval.c
src/version.c

index 7d00c0e47839c48c59690b952f5d75bac02b5a25..a73731198b642967d0958a4f90ee0a569360aa57 100644 (file)
@@ -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)
     {
index 3e56bdf3b1aaf02308759452d82fc06f67c0f6e2..05e50df55309700651df79ca888e327f0bfc0f51 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    97,
 /**/
     96,
 /**/