To: vim_dev@googlegroups.com
Subject: Patch 7.3.841
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.841
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)
Files:	    src/eval.c


*** ../vim-7.3.840/src/eval.c	2013-02-20 21:11:14.000000000 +0100
--- src/eval.c	2013-02-26 19:27:59.000000000 +0100
***************
*** 5164,5169 ****
--- 5164,5179 ----
  		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. */
*** ../vim-7.3.840/src/version.c	2013-02-26 18:45:49.000000000 +0100
--- src/version.c	2013-02-26 19:35:36.000000000 +0100
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     841,
  /**/

-- 
If someone questions your market projections, simply point out that your
target market is "People who are nuts" and "People who will buy any damn
thing".  Nobody is going to tell you there aren't enough of those people
to go around.
				(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
