mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +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:
@@ -208,7 +208,7 @@ typedef struct {
|
||||
OptInt wo_winbl;
|
||||
#define w_p_winbl w_onebuf_opt.wo_winbl // 'winblend'
|
||||
|
||||
LastSet wo_script_ctx[kWinOptCount]; // SCTXs for window-local options
|
||||
sctx_T wo_script_ctx[kWinOptCount]; // SCTXs for window-local options
|
||||
#define w_p_script_ctx w_onebuf_opt.wo_script_ctx
|
||||
} winopt_T;
|
||||
|
||||
@@ -510,7 +510,7 @@ struct file_buffer {
|
||||
// or contents of the file being edited.
|
||||
bool b_p_initialized; // set when options initialized
|
||||
|
||||
LastSet b_p_script_ctx[kBufOptCount]; // SCTXs for buffer-local options
|
||||
sctx_T b_p_script_ctx[kBufOptCount]; // SCTXs for buffer-local options
|
||||
|
||||
int b_p_ai; ///< 'autoindent'
|
||||
int b_p_ai_nopaste; ///< b_p_ai saved for paste mode
|
||||
|
Reference in New Issue
Block a user