mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 22:36:09 +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:
@@ -6714,8 +6714,8 @@ void win_comp_scroll(win_T *wp)
|
||||
|
||||
if (wp->w_p_scr != old_w_p_scr) {
|
||||
// Used by "verbose set scroll".
|
||||
wp->w_p_script_ctx[kWinOptScroll].script_ctx.sc_sid = SID_WINLAYOUT;
|
||||
wp->w_p_script_ctx[kWinOptScroll].script_ctx.sc_lnum = 0;
|
||||
wp->w_p_script_ctx[kWinOptScroll].sc_sid = SID_WINLAYOUT;
|
||||
wp->w_p_script_ctx[kWinOptScroll].sc_lnum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user