ipfire-3.x/vim/patches/vim-7.3.068.patch0

51 lines
1.5 KiB
Plaintext

To: vim_dev@googlegroups.com
Subject: Patch 7.3.068
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 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.
Files: src/ex_cmds.c
*** ../vim-7.3.067/src/ex_cmds.c 2010-10-15 20:20:00.000000000 +0200
--- src/ex_cmds.c 2010-11-24 17:53:07.000000000 +0100
***************
*** 2705,2710 ****
--- 2705,2714 ----
TRUE);
do_modelines(0);
}
+
+ /* Autocommands may have changed buffer names, esp. when
+ * 'autochdir' is set. */
+ fname = curbuf->b_sfname;
#endif
}
*** ../vim-7.3.067/src/version.c 2010-11-24 17:03:34.000000000 +0100
--- src/version.c 2010-11-24 17:55:11.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
{ /* Add new patch number below this line */
+ /**/
+ 68,
/**/
--
I used to wonder about the meaning of life. But I looked it
up in the dictionary under "L" and there it was - the meaning
of life. It was less than I expected. - Dogbert
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///