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