]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - vim/patches/vim-7.3.403.patch0
libpng: Update to 1.6.10.
[people/ms/ipfire-3.x.git] / vim / patches / vim-7.3.403.patch0
CommitLineData
c6060300
MT
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.403
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.403
11Problem: ":helpgrep" does not trigger QuickFixCmd* autocommands.
12Solution: Trigger the autocommands. (Christian Brabandt)
13Files: src/quickfix.c
14
15
16*** ../vim-7.3.402/src/quickfix.c 2012-01-20 13:28:28.000000000 +0100
17--- src/quickfix.c 2012-01-20 13:37:10.000000000 +0100
18***************
19*** 3878,3893 ****
20 qf_info_T *qi = &ql_info;
21 int new_qi = FALSE;
22 win_T *wp;
23!
24! /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
25! save_cpo = p_cpo;
26! p_cpo = empty_option;
27
28 #ifdef FEAT_MULTI_LANG
29 /* Check for a specified language */
30 lang = check_help_lang(eap->arg);
31 #endif
32
33 if (eap->cmdidx == CMD_lhelpgrep)
34 {
35 /* Find an existing help window */
36--- 3878,3912 ----
37 qf_info_T *qi = &ql_info;
38 int new_qi = FALSE;
39 win_T *wp;
40! #ifdef FEAT_AUTOCMD
41! char_u *au_name = NULL;
42! #endif
43
44 #ifdef FEAT_MULTI_LANG
45 /* Check for a specified language */
46 lang = check_help_lang(eap->arg);
47 #endif
48
49+ #ifdef FEAT_AUTOCMD
50+ switch (eap->cmdidx)
51+ {
52+ case CMD_helpgrep: au_name = (char_u *)"helpgrep"; break;
53+ case CMD_lhelpgrep: au_name = (char_u *)"lhelpgrep"; break;
54+ default: break;
55+ }
56+ if (au_name != NULL)
57+ {
58+ apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
59+ curbuf->b_fname, TRUE, curbuf);
60+ if (did_throw || force_abort)
61+ return;
62+ }
63+ #endif
64+
65+ /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
66+ save_cpo = p_cpo;
67+ p_cpo = empty_option;
68+
69 if (eap->cmdidx == CMD_lhelpgrep)
70 {
71 /* Find an existing help window */
72***************
73*** 4036,4041 ****
74--- 4055,4071 ----
75 qf_update_buffer(qi);
76 #endif
77
78+ #ifdef FEAT_AUTOCMD
79+ if (au_name != NULL)
80+ {
81+ apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
82+ curbuf->b_fname, TRUE, curbuf);
83+ if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL)
84+ /* autocommands made "qi" invalid */
85+ return;
86+ }
87+ #endif
88+
89 /* Jump to first match. */
90 if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
91 qf_jump(qi, 0, 0, FALSE);
92*** ../vim-7.3.402/src/version.c 2012-01-20 13:28:28.000000000 +0100
93--- src/version.c 2012-01-20 13:30:37.000000000 +0100
94***************
95*** 716,717 ****
96--- 716,719 ----
97 { /* Add new patch number below this line */
98+ /**/
99+ 403,
100 /**/
101
102--
103Looking at Perl through Lisp glasses, Perl looks atrocious.
104
105 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
106/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
107\\\ an exciting new programming language -- http://www.Zimbu.org ///
108 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///