diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-02-14 19:13:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 19:13:12 -0500 |
commit | 1539f713639eb1c661da9f9003fd58bf4cbbc615 (patch) | |
tree | 549a5a5ae5d23995ad058e677a8025e4aece2f66 /src/nvim/api/private/helpers.h | |
parent | 05faa8f30ad770d4e4ead41cec601ccced8fb97f (diff) | |
parent | c5b34fa55483d84d1de32937ffff0b7cf1aeba78 (diff) | |
download | rneovim-1539f713639eb1c661da9f9003fd58bf4cbbc615.tar.gz rneovim-1539f713639eb1c661da9f9003fd58bf4cbbc615.tar.bz2 rneovim-1539f713639eb1c661da9f9003fd58bf4cbbc615.zip |
Merge #22214 move init_default_autocmds to lua
Diffstat (limited to 'src/nvim/api/private/helpers.h')
-rw-r--r-- | src/nvim/api/private/helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h index ec97ba9ec6..b70452d7cb 100644 --- a/src/nvim/api/private/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -175,11 +175,13 @@ typedef struct { #define WITH_SCRIPT_CONTEXT(channel_id, code) \ do { \ const sctx_T save_current_sctx = current_sctx; \ + const uint64_t save_channel_id = current_channel_id; \ current_sctx.sc_sid = \ (channel_id) == LUA_INTERNAL_CALL ? SID_LUA : SID_API_CLIENT; \ current_sctx.sc_lnum = 0; \ current_channel_id = channel_id; \ code; \ + current_channel_id = save_channel_id; \ current_sctx = save_current_sctx; \ } while (0); |