| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| } |
| |
| |
| |
| *** 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 /// |