diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-13 16:07:05 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-14 04:29:44 +0800 |
commit | ded2925b406f55223f6093544bc3a38534c1e72e (patch) | |
tree | c5a7b5cfebbcfdada9e5a772c4ae6d46fc6e73d0 /src/nvim/lua/executor.c | |
parent | f52c236c5b432629f0e074c3511e7e9d481197b1 (diff) | |
download | rneovim-ded2925b406f55223f6093544bc3a38534c1e72e.tar.gz rneovim-ded2925b406f55223f6093544bc3a38534c1e72e.tar.bz2 rneovim-ded2925b406f55223f6093544bc3a38534c1e72e.zip |
refactor: change remaining sourcing_name/sourcing_lnum to exestack
Co-Authored-By: VVKot <volodymyr.kot.ua@gmail.com>
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 342b3f6c67..2e5b411fad 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -37,6 +37,7 @@ #include "nvim/msgpack_rpc/channel.h" #include "nvim/os/os.h" #include "nvim/profile.h" +#include "nvim/runtime.h" #include "nvim/screen.h" #include "nvim/undo.h" #include "nvim/usercmd.h" @@ -1313,13 +1314,11 @@ static void nlua_typval_exec(const char *lcmd, size_t lcmd_len, const char *name int nlua_source_using_linegetter(LineGetter fgetline, void *cookie, char *name) { -#if 0 // TODO: - const linenr_T save_sourcing_lnum = sourcing_lnum; const sctx_T save_current_sctx = current_sctx; current_sctx.sc_sid = SID_STR; current_sctx.sc_seq = 0; current_sctx.sc_lnum = 0; - sourcing_lnum = 0; + estack_push(ETYPE_SCRIPT, NULL, 0); garray_T ga; char_u *line = NULL; @@ -1332,12 +1331,11 @@ int nlua_source_using_linegetter(LineGetter fgetline, void *cookie, char *name) size_t len = strlen(code); nlua_typval_exec(code, len, name, NULL, 0, false, NULL); - sourcing_lnum = save_sourcing_lnum; + estack_pop(); current_sctx = save_current_sctx; ga_clear_strings(&ga); xfree(code); return OK; -#endif } /// Call a LuaCallable given some typvals |