]>
Commit | Line | Data |
---|---|---|
0a7814d6 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.098 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.098 | |
11 | Problem: ":call s:var()" doesn't work if "s:var" is a Funcref. (Andy Wokula) | |
12 | Solution: Before converting "s:" into a script ID, check if it is a Funcref. | |
13 | Files: src/eval.c | |
14 | ||
15 | ||
16 | *** ../vim-7.1.097/src/eval.c Wed Sep 5 21:45:54 2007 | |
17 | --- src/eval.c Thu Sep 6 12:11:19 2007 | |
18 | *************** | |
19 | *** 19367,19372 **** | |
20 | --- 19367,19394 ---- | |
21 | if (lv.ll_name == NULL) | |
22 | { | |
23 | /* Error found, but continue after the function name. */ | |
24 | + *pp = end; | |
25 | + goto theend; | |
26 | + } | |
27 | + | |
28 | + /* Check if the name is a Funcref. If so, use the value. */ | |
29 | + if (lv.ll_exp_name != NULL) | |
30 | + { | |
31 | + len = (int)STRLEN(lv.ll_exp_name); | |
32 | + name = deref_func_name(lv.ll_exp_name, &len); | |
33 | + if (name == lv.ll_exp_name) | |
34 | + name = NULL; | |
35 | + } | |
36 | + else | |
37 | + { | |
38 | + len = (int)(end - *pp); | |
39 | + name = deref_func_name(*pp, &len); | |
40 | + if (name == *pp) | |
41 | + name = NULL; | |
42 | + } | |
43 | + if (name != NULL) | |
44 | + { | |
45 | + name = vim_strsave(name); | |
46 | *pp = end; | |
47 | goto theend; | |
48 | } | |
49 | *** ../vim-7.1.097/src/version.c Thu Sep 6 13:32:53 2007 | |
50 | --- src/version.c Thu Sep 6 14:24:10 2007 | |
51 | *************** | |
52 | *** 668,669 **** | |
53 | --- 668,671 ---- | |
54 | { /* Add new patch number below this line */ | |
55 | + /**/ | |
56 | + 98, | |
57 | /**/ | |
58 | ||
59 | -- | |
60 | Not too long ago, a program was something you watched on TV... | |
61 | ||
62 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
63 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
64 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
65 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |