Karsten Hopp 3bed6c
To: vim_dev@googlegroups.com
Karsten Hopp 3bed6c
Subject: Patch 7.3.841
Karsten Hopp 3bed6c
Fcc: outbox
Karsten Hopp 3bed6c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 3bed6c
Mime-Version: 1.0
Karsten Hopp 3bed6c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 3bed6c
Content-Transfer-Encoding: 8bit
Karsten Hopp 3bed6c
------------
Karsten Hopp 3bed6c
Karsten Hopp 3bed6c
Patch 7.3.841
Karsten Hopp 3bed6c
Problem:    When a "cond ? one : two" expression has a subscript it is not
Karsten Hopp 3bed6c
	    parsed correctly. (Andy Wokula)
Karsten Hopp 3bed6c
Solution:   Handle a subscript also when the type is unknown. (Christian
Karsten Hopp 3bed6c
	    Brabandt)
Karsten Hopp 3bed6c
Files:	    src/eval.c
Karsten Hopp 3bed6c
Karsten Hopp 3bed6c
Karsten Hopp 3bed6c
*** ../vim-7.3.840/src/eval.c	2013-02-20 21:11:14.000000000 +0100
Karsten Hopp 3bed6c
--- src/eval.c	2013-02-26 19:27:59.000000000 +0100
Karsten Hopp 3bed6c
***************
Karsten Hopp 3bed6c
*** 5164,5169 ****
Karsten Hopp 3bed6c
--- 5164,5179 ----
Karsten Hopp 3bed6c
  		ret = get_func_tv(s, len, rettv, arg,
Karsten Hopp 3bed6c
  			  curwin->w_cursor.lnum, curwin->w_cursor.lnum,
Karsten Hopp 3bed6c
  			  &len, evaluate, NULL);
Karsten Hopp 3bed6c
+ 
Karsten Hopp 3bed6c
+ 		/* If evaluate is FALSE rettv->v_type was not set in
Karsten Hopp 3bed6c
+ 		 * get_func_tv, but it's needed in handle_subscript() to parse
Karsten Hopp 3bed6c
+ 		 * what follows. So set it here. */
Karsten Hopp 3bed6c
+ 		if (rettv->v_type == VAR_UNKNOWN && !evaluate && **arg == '(')
Karsten Hopp 3bed6c
+ 		{
Karsten Hopp 3bed6c
+ 		    rettv->vval.v_string = vim_strsave("");
Karsten Hopp 3bed6c
+ 		    rettv->v_type = VAR_FUNC;
Karsten Hopp 3bed6c
+ 		}
Karsten Hopp 3bed6c
+ 
Karsten Hopp 3bed6c
  		/* Stop the expression evaluation when immediately
Karsten Hopp 3bed6c
  		 * aborting on error, or when an interrupt occurred or
Karsten Hopp 3bed6c
  		 * an exception was thrown but not caught. */
Karsten Hopp 3bed6c
*** ../vim-7.3.840/src/version.c	2013-02-26 18:45:49.000000000 +0100
Karsten Hopp 3bed6c
--- src/version.c	2013-02-26 19:35:36.000000000 +0100
Karsten Hopp 3bed6c
***************
Karsten Hopp 3bed6c
*** 730,731 ****
Karsten Hopp 3bed6c
--- 730,733 ----
Karsten Hopp 3bed6c
  {   /* Add new patch number below this line */
Karsten Hopp 3bed6c
+ /**/
Karsten Hopp 3bed6c
+     841,
Karsten Hopp 3bed6c
  /**/
Karsten Hopp 3bed6c
Karsten Hopp 3bed6c
-- 
Karsten Hopp 3bed6c
If someone questions your market projections, simply point out that your
Karsten Hopp 3bed6c
target market is "People who are nuts" and "People who will buy any damn
Karsten Hopp 3bed6c
thing".  Nobody is going to tell you there aren't enough of those people
Karsten Hopp 3bed6c
to go around.
Karsten Hopp 3bed6c
				(Scott Adams - The Dilbert principle)
Karsten Hopp 3bed6c
Karsten Hopp 3bed6c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 3bed6c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 3bed6c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 3bed6c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///