diff options
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 5 |
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); |