1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: ":helpgrep" does not trigger QuickFixCmd* autocommands.
12 Solution: Trigger the autocommands. (Christian Brabandt)
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
20 qf_info_T *qi = &ql_info;
24 ! /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
26 ! p_cpo = empty_option;
28 #ifdef FEAT_MULTI_LANG
29 /* Check for a specified language */
30 lang = check_help_lang(eap->arg);
33 if (eap->cmdidx == CMD_lhelpgrep)
35 /* Find an existing help window */
37 qf_info_T *qi = &ql_info;
41 ! char_u *au_name = NULL;
44 #ifdef FEAT_MULTI_LANG
45 /* Check for a specified language */
46 lang = check_help_lang(eap->arg);
50 + switch (eap->cmdidx)
52 + case CMD_helpgrep: au_name = (char_u *)"helpgrep"; break;
53 + case CMD_lhelpgrep: au_name = (char_u *)"lhelpgrep"; break;
56 + if (au_name != NULL)
58 + apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
59 + curbuf->b_fname, TRUE, curbuf);
60 + if (did_throw || force_abort)
65 + /* Make 'cpoptions' empty, the 'l' flag should not be used here. */
67 + p_cpo = empty_option;
69 if (eap->cmdidx == CMD_lhelpgrep)
71 /* Find an existing help window */
79 + if (au_name != NULL)
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 */
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
97 { /* Add new patch number below this line */
103 Looking at Perl through Lisp glasses, Perl looks atrocious.
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 ///