]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.197 v7.3.197
authorBram Moolenaar <Bram@vim.org>
Thu, 19 May 2011 15:42:59 +0000 (17:42 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 May 2011 15:42:59 +0000 (17:42 +0200)
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)

src/quickfix.c
src/version.c

index 9308d4b1ec5d85474ca4c5bdd2e15115cbf23af1..999c66ed9b095fd92f0291f5e4dc1e3bb09aa567 100644 (file)
@@ -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);
index 66de09ee53b919cc84f79cef7daa7c30699a3d49..db678ce53685fd9035e9c69dd523cb0f0ea2fa92 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    197,
 /**/
     196,
 /**/