summaryrefslogtreecommitdiff
path: root/src/quickfix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-05-19 17:42:59 +0200
committerBram Moolenaar <Bram@vim.org>2011-05-19 17:42:59 +0200
commitefa8e80c0bbd2a1c732f9cfccf296dacf96bddbe (patch)
tree19ce2afe54366d8e5bfe296d8eb58f99bf29420e /src/quickfix.c
parente659c95b01b04b353e60d728d32bcb17f8ff832c (diff)
downloadvim-git-efa8e80c0bbd2a1c732f9cfccf296dacf96bddbe.tar.gz
updated for version 7.3.197v7.3.197
Problem: When a QuickfixCmdPost event removes all errors, Vim still tries to jump to the first error, resulting in E42. Solution: Get the number of error after the autocmd event. (Mike Lundy)
Diffstat (limited to 'src/quickfix.c')
-rw-r--r--src/quickfix.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 9308d4b1e..999c66ed9 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2813,17 +2813,21 @@ ex_make(eap)
(eap->cmdidx != CMD_grepadd
&& eap->cmdidx != CMD_lgrepadd),
*eap->cmdlinep);
+ if (wp != NULL)
+ qi = GET_LOC_LIST(wp);
#ifdef FEAT_AUTOCMD
if (au_name != NULL)
+ {
apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
curbuf->b_fname, TRUE, curbuf);
+ if (qi->qf_curlist < qi->qf_listcount)
+ res = qi->qf_lists[qi->qf_curlist].qf_count;
+ else
+ res = 0;
+ }
#endif
if (res > 0 && !eap->forceit)
- {
- if (wp != NULL)
- qi = GET_LOC_LIST(wp);
qf_jump(qi, 0, 0, FALSE); /* display first error */
- }
mch_remove(fname);
vim_free(fname);