diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-11-24 17:59:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-11-24 17:59:32 +0100 |
commit | f666f0e5c07723c77cb9bc34034542a3c6106e4e (patch) | |
tree | 4a2ba960b86c5c8654de46a84670407bb737e24d /src/ex_cmds.c | |
parent | ef2f028a66a45eed5bd65c3d7a44522303bf6050 (diff) | |
download | vim-git-f666f0e5c07723c77cb9bc34034542a3c6106e4e.tar.gz |
updated for version 7.3.068v7.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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index b3f761921..8a24c0a71 100644 --- 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 } |