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: When a QuickfixCmdPost event removes all errors, Vim still tries
12 to jump to the first error, resulting in E42.
13 Solution: Get the number of error after the autocmd event. (Mike Lundy)
17 *** ../mercurial/vim73/src/quickfix.c 2011-05-10 16:41:13.000000000 +0200
18 --- src/quickfix.c 2011-05-19 17:34:11.000000000 +0200
21 (eap->cmdidx != CMD_grepadd
22 && eap->cmdidx != CMD_lgrepadd),
26 apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
27 curbuf->b_fname, TRUE, curbuf);
29 if (res > 0 && !eap->forceit)
32 - qi = GET_LOC_LIST(wp);
33 qf_jump(qi, 0, 0, FALSE); /* display first error */
39 (eap->cmdidx != CMD_grepadd
40 && eap->cmdidx != CMD_lgrepadd),
43 + qi = GET_LOC_LIST(wp);
47 apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
48 curbuf->b_fname, TRUE, curbuf);
49 + if (qi->qf_curlist < qi->qf_listcount)
50 + res = qi->qf_lists[qi->qf_curlist].qf_count;
55 if (res > 0 && !eap->forceit)
56 qf_jump(qi, 0, 0, FALSE); /* display first error */
60 *** ../vim-7.3.196/src/version.c 2011-05-19 17:25:36.000000000 +0200
61 --- src/version.c 2011-05-19 17:41:50.000000000 +0200
65 { /* Add new patch number below this line */
72 ...for the clothes that fit a little too snug because it
73 means I have more than enough to eat.
75 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
76 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
77 \\\ an exciting new programming language -- http://www.Zimbu.org ///
78 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///