]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.068 v7.3.068
authorBram Moolenaar <Bram@vim.org>
Wed, 24 Nov 2010 16:59:32 +0000 (17:59 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 24 Nov 2010 16:59:32 +0000 (17:59 +0100)
Problem:    Using freed memory when doing ":saveas" and an autocommand sets
            'autochdir'. (Kevin Klement)
Solution:   Get the value of fname again after executing autocommands.

src/ex_cmds.c
src/version.c

index b3f76192151e52b620442a0c9bcc1cc630b97c97..8a24c0a71795da51791b66ecd05b2c40ebff4cba 100644 (file)
@@ -2705,6 +2705,10 @@ do_write(eap)
                                                                        TRUE);
                do_modelines(0);
            }
+
+           /* Autocommands may have changed buffer names, esp. when
+            * 'autochdir' is set. */
+           fname = curbuf->b_sfname;
 #endif
        }
 
index bd56962274000d9c5f4889157b7d7132545cf9fe..d92f09040be3a10a7622963585287f0ed8508986 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    68,
 /**/
     67,
 /**/