diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-08-16 05:37:49 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-16 05:39:12 +0800 |
| commit | 1d28bbf1e53fac5160a24b1194090a4e1c5b6046 (patch) | |
| tree | ee7d5dd6b508e3f5e57d4c127b738e175b28fdc0 /src/nvim/runtime.c | |
| parent | e954d62527a6dc081d8942ccac740f17442446be (diff) | |
| download | rneovim-1d28bbf1e53fac5160a24b1194090a4e1c5b6046.tar.gz rneovim-1d28bbf1e53fac5160a24b1194090a4e1c5b6046.tar.bz2 rneovim-1d28bbf1e53fac5160a24b1194090a4e1c5b6046.zip | |
vim-patch:9.0.0217: 'shellslash' works differently when sourcing a script again
Problem: 'shellslash' works differently when sourcing a script again.
Solution: Use the name from the script item. (closes vim/vim#10920)
https://github.com/vim/vim/commit/5a4fff4d948cd12a5cf5f637ad2c561815a77d8e
Diffstat (limited to 'src/nvim/runtime.c')
| -rw-r--r-- | src/nvim/runtime.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c index 4eb38c2c9e..1ec9cd0e0e 100644 --- a/src/nvim/runtime.c +++ b/src/nvim/runtime.c @@ -1941,9 +1941,6 @@ int do_source(char *fname, int check_other, int is_vimrc) cookie.level = ex_nesting_level; - // Keep the sourcing name/lnum, for recursive calls. - estack_push(ETYPE_SCRIPT, fname_exp, 0); - // start measuring script load time if --startuptime was passed and // time_fd was successfully opened afterwards. proftime_T rel_time; @@ -1966,6 +1963,9 @@ int do_source(char *fname, int check_other, int is_vimrc) const sctx_T save_current_sctx = current_sctx; si = get_current_script_id(&fname_exp, ¤t_sctx); + // Keep the sourcing name/lnum, for recursive calls. + estack_push(ETYPE_SCRIPT, (char *)si->sn_name, 0); + if (l_do_profiling == PROF_YES) { bool forceit = false; |