changeset 2648:656e652c6579 v7.3.068

updated for version 7.3.068 Problem: Using freed memory when doing ":saveas" and an autocommand sets 'autochdir'. (Kevin Klement) Solution: Get the value of fname again after executing autocommands.
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Nov 2010 17:59:32 +0100
parents dfd5dcc73daa
children b2789846ed39
files src/ex_cmds.c src/version.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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
 	}
 
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    68,
+/**/
     67,
 /**/
     66,