summaryrefslogtreecommitdiff
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
commitdfcac2712f2ec0e6944e7a11bb755bf5280d2cd2 (patch)
tree2c21bce26a531eed0dda481812c0ee2c4c677b03
parent82fac3fae05c220e2efbd44b14f4f7ef3c8d63af (diff)
downloadvim-dfcac2712f2ec0e6944e7a11bb755bf5280d2cd2.tar.gz
updated for version 7.3.197v7.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)
-rw-r--r--src/quickfix.c12
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/quickfix.c b/src/quickfix.c
index 9308d4b1..999c66ed 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);
diff --git a/src/version.c b/src/version.c
index 66de09ee..db678ce5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 197,
+/**/
196,
/**/
195,