]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.066 v7.3.066
authorBram Moolenaar <Bram@vim.org>
Wed, 24 Nov 2010 15:32:05 +0000 (16:32 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 24 Nov 2010 15:32:05 +0000 (16:32 +0100)
Problem:    Crash when changing to another window while in a :vimgrep command.
            (Christian Brabandt)
Solution:   When wiping out the dummy before, remove it from aucmd_win.

src/quickfix.c
src/version.c

index 024952379ccc989ac399304d6669604cd615f7c4..5060675fd4fb0a810541a24c002668db69d7b21e 100644 (file)
@@ -3432,6 +3432,7 @@ load_dummy_buffer(fname)
     char_u     *fname;
 {
     buf_T      *newbuf;
+    buf_T      *newbuf_to_wipe = NULL;
     int                failed = TRUE;
     aco_save_T aco;
 
@@ -3468,15 +3469,19 @@ load_dummy_buffer(fname)
            failed = FALSE;
            if (curbuf != newbuf)
            {
-               /* Bloody autocommands changed the buffer! */
-               if (buf_valid(newbuf))
-                   wipe_buffer(newbuf, FALSE);
+               /* Bloody autocommands changed the buffer!  Can happen when
+                * using netrw and editing a remote file.  Use the current
+                * buffer instead, delete the dummy one after restoring the
+                * window stuff. */
+               newbuf_to_wipe = newbuf;
                newbuf = curbuf;
            }
        }
 
        /* restore curwin/curbuf and a few other things */
        aucmd_restbuf(&aco);
+       if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe))
+           wipe_buffer(newbuf_to_wipe, FALSE);
     }
 
     if (!buf_valid(newbuf))
index e334d0a36ab44a6833827bb3bf0ce72658e0fd05..95c0262843f36a640c1684177400855c8b38027f 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    66,
 /**/
     65,
 /**/