]>
Commit | Line | Data |
---|---|---|
907f7fb0 ER |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.337 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.2.337 | |
11 | Problem: The :compiler command doesn't function properly when invoked in a | |
12 | function. | |
13 | Solution: Add "g:" before "current_compiler". (Yukihiro Nakadaira) | |
14 | Files: src/ex_cmds2.c | |
15 | ||
16 | ||
17 | *** ../vim-7.2.336/src/ex_cmds2.c 2009-05-16 21:16:12.000000000 +0200 | |
18 | --- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100 | |
19 | *************** | |
20 | *** 2496,2509 **** | |
21 | * To remain backwards compatible "current_compiler" is always | |
22 | * used. A user's compiler plugin may set it, the distributed | |
23 | * plugin will then skip the settings. Afterwards set | |
24 | ! * "b:current_compiler" and restore "current_compiler". */ | |
25 | ! old_cur_comp = get_var_value((char_u *)"current_compiler"); | |
26 | if (old_cur_comp != NULL) | |
27 | old_cur_comp = vim_strsave(old_cur_comp); | |
28 | do_cmdline_cmd((char_u *) | |
29 | "command -nargs=* CompilerSet setlocal <args>"); | |
30 | } | |
31 | ! do_unlet((char_u *)"current_compiler", TRUE); | |
32 | do_unlet((char_u *)"b:current_compiler", TRUE); | |
33 | ||
34 | sprintf((char *)buf, "compiler/%s.vim", eap->arg); | |
35 | --- 2496,2510 ---- | |
36 | * To remain backwards compatible "current_compiler" is always | |
37 | * used. A user's compiler plugin may set it, the distributed | |
38 | * plugin will then skip the settings. Afterwards set | |
39 | ! * "b:current_compiler" and restore "current_compiler". | |
40 | ! * Explicitly prepend "g:" to make it work in a function. */ | |
41 | ! old_cur_comp = get_var_value((char_u *)"g:current_compiler"); | |
42 | if (old_cur_comp != NULL) | |
43 | old_cur_comp = vim_strsave(old_cur_comp); | |
44 | do_cmdline_cmd((char_u *) | |
45 | "command -nargs=* CompilerSet setlocal <args>"); | |
46 | } | |
47 | ! do_unlet((char_u *)"g:current_compiler", TRUE); | |
48 | do_unlet((char_u *)"b:current_compiler", TRUE); | |
49 | ||
50 | sprintf((char *)buf, "compiler/%s.vim", eap->arg); | |
51 | *************** | |
52 | *** 2514,2520 **** | |
53 | do_cmdline_cmd((char_u *)":delcommand CompilerSet"); | |
54 | ||
55 | /* Set "b:current_compiler" from "current_compiler". */ | |
56 | ! p = get_var_value((char_u *)"current_compiler"); | |
57 | if (p != NULL) | |
58 | set_internal_string_var((char_u *)"b:current_compiler", p); | |
59 | ||
60 | --- 2515,2521 ---- | |
61 | do_cmdline_cmd((char_u *)":delcommand CompilerSet"); | |
62 | ||
63 | /* Set "b:current_compiler" from "current_compiler". */ | |
64 | ! p = get_var_value((char_u *)"g:current_compiler"); | |
65 | if (p != NULL) | |
66 | set_internal_string_var((char_u *)"b:current_compiler", p); | |
67 | ||
68 | *************** | |
69 | *** 2523,2534 **** | |
70 | { | |
71 | if (old_cur_comp != NULL) | |
72 | { | |
73 | ! set_internal_string_var((char_u *)"current_compiler", | |
74 | old_cur_comp); | |
75 | vim_free(old_cur_comp); | |
76 | } | |
77 | else | |
78 | ! do_unlet((char_u *)"current_compiler", TRUE); | |
79 | } | |
80 | } | |
81 | } | |
82 | --- 2524,2535 ---- | |
83 | { | |
84 | if (old_cur_comp != NULL) | |
85 | { | |
86 | ! set_internal_string_var((char_u *)"g:current_compiler", | |
87 | old_cur_comp); | |
88 | vim_free(old_cur_comp); | |
89 | } | |
90 | else | |
91 | ! do_unlet((char_u *)"g:current_compiler", TRUE); | |
92 | } | |
93 | } | |
94 | } | |
95 | *** ../vim-7.2.336/src/version.c 2010-01-19 15:51:29.000000000 +0100 | |
96 | --- src/version.c 2010-01-19 16:11:20.000000000 +0100 | |
97 | *************** | |
98 | *** 683,684 **** | |
99 | --- 683,686 ---- | |
100 | { /* Add new patch number below this line */ | |
101 | + /**/ | |
102 | + 337, | |
103 | /**/ | |
104 | ||
105 | -- | |
106 | hundred-and-one symptoms of being an internet addict: | |
107 | 121. You ask for e-mail adresses instead of telephone numbers. | |
108 | ||
109 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
110 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
111 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
112 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |