diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-17 20:24:35 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-17 20:27:08 -0400 |
commit | fdfdc0a228b896a3ce606fb523f5677092490dcc (patch) | |
tree | 8d5c7d2071fee4131cd8f05bb9926d3999ef88e7 | |
parent | aa681df25fc1b1c22182c8150e53952fefa63e10 (diff) | |
download | rneovim-fdfdc0a228b896a3ce606fb523f5677092490dcc.tar.gz rneovim-fdfdc0a228b896a3ce606fb523f5677092490dcc.tar.bz2 rneovim-fdfdc0a228b896a3ce606fb523f5677092490dcc.zip |
vim-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.
https://github.com/vim/vim/commit/ea56e167c87352f07a77d3661425e336817a7141
-rw-r--r-- | src/nvim/ex_cmds2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 71c9290027..c092036ce9 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -3186,7 +3186,7 @@ int do_source(char_u *fname, int check_other, int is_vimrc) } si = &SCRIPT_ITEM(current_SID); si->sn_name = fname_exp; - fname_exp = NULL; + fname_exp = vim_strsave(si->sn_name); // used for autocmd if (file_id_ok) { si->file_id_valid = true; si->file_id = file_id; @@ -3288,7 +3288,7 @@ int do_source(char_u *fname, int check_other, int is_vimrc) convert_setup(&cookie.conv, NULL, NULL); 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: |