changeset 15448:4880dc2ccc3f v8.1.0732

patch 8.1.0732: cannot build without the eval feature commit https://github.com/vim/vim/commit/ea56e167c87352f07a77d3661425e336817a7141 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 12 15:15:38 2019 +0100 patch 8.1.0732: cannot build without the eval feature Problem: Cannot build without the eval feature. Solution: Make a copy of the sourced file name.
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Jan 2019 15:30:06 +0100
parents 913c93a50323
children 869f88d11e31
files src/ex_cmds2.c src/version.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -4556,7 +4556,7 @@ do_source(
 	}
 	si = &SCRIPT_ITEM(current_sctx.sc_sid);
 	si->sn_name = fname_exp;
-	fname_exp = NULL;
+	fname_exp = vim_strsave(si->sn_name);  // used for autocmd
 # ifdef UNIX
 	if (stat_ok)
 	{
@@ -4688,8 +4688,7 @@ almosttheend:
 #endif
 
     if (trigger_source_post)
-	apply_autocmds(EVENT_SOURCEPOST, si->sn_name, si->sn_name,
-								FALSE, curbuf);
+	apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf);
 
 theend:
     vim_free(fname_exp);
--- a/src/version.c
+++ b/src/version.c
@@ -796,6 +796,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    732,
+/**/
     731,
 /**/
     730,