Karsten Hopp ac3838
To: vim-dev@vim.org
Karsten Hopp ac3838
Subject: patch 7.1.098
Karsten Hopp ac3838
Fcc: outbox
Karsten Hopp ac3838
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ac3838
Mime-Version: 1.0
Karsten Hopp ac3838
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp ac3838
Content-Transfer-Encoding: 8bit
Karsten Hopp ac3838
------------
Karsten Hopp ac3838
Karsten Hopp ac3838
Patch 7.1.098
Karsten Hopp ac3838
Problem:    ":call s:var()" doesn't work if "s:var" is a Funcref. (Andy Wokula)
Karsten Hopp ac3838
Solution:   Before converting "s:" into a script ID, check if it is a Funcref.
Karsten Hopp ac3838
Files:	    src/eval.c
Karsten Hopp ac3838
Karsten Hopp ac3838
Karsten Hopp ac3838
*** ../vim-7.1.097/src/eval.c	Wed Sep  5 21:45:54 2007
Karsten Hopp ac3838
--- src/eval.c	Thu Sep  6 12:11:19 2007
Karsten Hopp ac3838
***************
Karsten Hopp ac3838
*** 19367,19372 ****
Karsten Hopp ac3838
--- 19367,19394 ----
Karsten Hopp ac3838
      if (lv.ll_name == NULL)
Karsten Hopp ac3838
      {
Karsten Hopp ac3838
  	/* Error found, but continue after the function name. */
Karsten Hopp ac3838
+ 	*pp = end;
Karsten Hopp ac3838
+ 	goto theend;
Karsten Hopp ac3838
+     }
Karsten Hopp ac3838
+ 
Karsten Hopp ac3838
+     /* Check if the name is a Funcref.  If so, use the value. */
Karsten Hopp ac3838
+     if (lv.ll_exp_name != NULL)
Karsten Hopp ac3838
+     {
Karsten Hopp ac3838
+ 	len = (int)STRLEN(lv.ll_exp_name);
Karsten Hopp ac3838
+ 	name = deref_func_name(lv.ll_exp_name, &len;;
Karsten Hopp ac3838
+ 	if (name == lv.ll_exp_name)
Karsten Hopp ac3838
+ 	    name = NULL;
Karsten Hopp ac3838
+     }
Karsten Hopp ac3838
+     else
Karsten Hopp ac3838
+     {
Karsten Hopp ac3838
+ 	len = (int)(end - *pp);
Karsten Hopp ac3838
+ 	name = deref_func_name(*pp, &len;;
Karsten Hopp ac3838
+ 	if (name == *pp)
Karsten Hopp ac3838
+ 	    name = NULL;
Karsten Hopp ac3838
+     }
Karsten Hopp ac3838
+     if (name != NULL)
Karsten Hopp ac3838
+     {
Karsten Hopp ac3838
+ 	name = vim_strsave(name);
Karsten Hopp ac3838
  	*pp = end;
Karsten Hopp ac3838
  	goto theend;
Karsten Hopp ac3838
      }
Karsten Hopp ac3838
*** ../vim-7.1.097/src/version.c	Thu Sep  6 13:32:53 2007
Karsten Hopp ac3838
--- src/version.c	Thu Sep  6 14:24:10 2007
Karsten Hopp ac3838
***************
Karsten Hopp ac3838
*** 668,669 ****
Karsten Hopp ac3838
--- 668,671 ----
Karsten Hopp ac3838
  {   /* Add new patch number below this line */
Karsten Hopp ac3838
+ /**/
Karsten Hopp ac3838
+     98,
Karsten Hopp ac3838
  /**/
Karsten Hopp ac3838
Karsten Hopp ac3838
-- 
Karsten Hopp ac3838
Not too long ago, a program was something you watched on TV...
Karsten Hopp ac3838
Karsten Hopp ac3838
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ac3838
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ac3838
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp ac3838
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///