mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 21:38:19 +00:00
API: make nvim_win_set_option() set window-global, not buffer-local #9110
NB: the `!(flags & SOPT_GLOBAL)` exception is for 'statusline'. Because `:set statusline=...` sets the global value for _all_ windows, `:setlocal` is the best we can do there. This is a one-of-a-kind option that doesn't work like any other option.
This commit is contained in:

committed by
Justin M. Keyes

parent
b10d703213
commit
fb19aeeb33
@@ -394,7 +394,9 @@ void set_option_to(uint64_t channel_id, void *to, int type,
|
||||
current_SID = channel_id == LUA_INTERNAL_CALL ? SID_LUA : SID_API_CLIENT;
|
||||
current_channel_id = channel_id;
|
||||
|
||||
const int opt_flags = (type == SREQ_GLOBAL) ? OPT_GLOBAL : OPT_LOCAL;
|
||||
const int opt_flags = (type == SREQ_WIN && !(flags & SOPT_GLOBAL))
|
||||
? 0 : (type == SREQ_GLOBAL)
|
||||
? OPT_GLOBAL : OPT_LOCAL;
|
||||
set_option_value_for(name.data, numval, stringval,
|
||||
opt_flags, type, to, err);
|
||||
|
||||
|
Reference in New Issue
Block a user