mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 14:59:20 +00:00
fix(api): don't override Vimscript SID (#32610)
Problem: When calling an API from Vimscript to set an option, mapping,
etc., :verbose shows that it's set from an API client.
Solution: Don't override current_sctx.sc_sid when calling an API from
Vimscript. Also fix the inverse case where API channel id is
not set when calling an API from RPC. Move channel id into
sctx_T to make saving and restoring easier.
Related #8329
This commit is contained in:
@@ -1747,7 +1747,7 @@ static char *eval_includeexpr(const char *const ptr, const size_t len)
|
||||
{
|
||||
const sctx_T save_sctx = current_sctx;
|
||||
set_vim_var_string(VV_FNAME, ptr, (ptrdiff_t)len);
|
||||
current_sctx = curbuf->b_p_script_ctx[kBufOptIncludeexpr].script_ctx;
|
||||
current_sctx = curbuf->b_p_script_ctx[kBufOptIncludeexpr];
|
||||
|
||||
char *res = eval_to_string_safe(curbuf->b_p_inex,
|
||||
was_set_insecurely(curwin, kOptIncludeexpr, OPT_LOCAL),
|
||||
|
||||
Reference in New Issue
Block a user