diff options
Diffstat (limited to 'src/nvim/api/private/helpers.h')
-rw-r--r-- | src/nvim/api/private/helpers.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nvim/api/private/helpers.h b/src/nvim/api/private/helpers.h index 5cf1ca4d34..d51f99e5ac 100644 --- a/src/nvim/api/private/helpers.h +++ b/src/nvim/api/private/helpers.h @@ -186,13 +186,7 @@ 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; \ + const sctx_T save_current_sctx = api_set_sctx(channel_id); \ code; \ - current_channel_id = save_channel_id; \ current_sctx = save_current_sctx; \ } while (0); |