summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-12 15:15:38 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-12 15:15:38 +0100
commitea56e167c87352f07a77d3661425e336817a7141 (patch)
tree607a3d9ed5c1d95ede7291b6d2738623da7ea1a5 /src/ex_cmds2.c
parent5f6b379ff3e34297d171635933f907ec80ed4f05 (diff)
patch 8.1.0732: cannot build without the eval featurev8.1.0732
Problem: Cannot build without the eval feature. Solution: Make a copy of the sourced file name.
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 4d48c1beb5..b3678b15cb 100644
--- 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);