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.
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index 4d48c1b..b3678b1 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -4556,7 +4556,7 @@
}
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 @@
#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);