]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.841 v7.3.841
authorBram Moolenaar <Bram@vim.org>
Tue, 26 Feb 2013 18:36:15 +0000 (19:36 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 26 Feb 2013 18:36:15 +0000 (19:36 +0100)
Problem:    When a "cond ? one : two" expression has a subscript it is not
            parsed correctly. (Andy Wokula)
Solution:   Handle a subscript also when the type is unknown. (Christian
            Brabandt)

src/eval.c
src/version.c

index 480f214b4a54c91550d921e38b434bfe796ed0e3..d5a41fbcea26be5a574709657e8c7d973bd576d9 100644 (file)
@@ -5164,6 +5164,16 @@ eval7(arg, rettv, evaluate, want_string)
                ret = get_func_tv(s, len, rettv, arg,
                          curwin->w_cursor.lnum, curwin->w_cursor.lnum,
                          &len, evaluate, NULL);
+
+               /* If evaluate is FALSE rettv->v_type was not set in
+                * get_func_tv, but it's needed in handle_subscript() to parse
+                * what follows. So set it here. */
+               if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
+               {
+                   rettv->vval.v_string = vim_strsave("");
+                   rettv->v_type = VAR_FUNC;
+               }
+
                /* Stop the expression evaluation when immediately
                 * aborting on error, or when an interrupt occurred or
                 * an exception was thrown but not caught. */
index 7c12188fe54a22771ec10c22594bcd58bd104080..6098591c0cb34daed0432d3425cf4c72ff882542 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    841,
 /**/
     840,
 /**/