mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
api: {get,set}_option should {get,set} global value of local options (#6405)
- nvim_get_option should return the global default of a local option. - nvim_set_option should set the global default of a local option.
This commit is contained in:

committed by
Justin M. Keyes

parent
66b336d89b
commit
eb0e94f71b
@@ -289,7 +289,7 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
|
||||
}
|
||||
}
|
||||
|
||||
int opt_flags = (type ? OPT_LOCAL : OPT_GLOBAL);
|
||||
int opt_flags = (type == SREQ_GLOBAL) ? OPT_GLOBAL : OPT_LOCAL;
|
||||
|
||||
if (flags & SOPT_BOOL) {
|
||||
if (value.type != kObjectTypeBoolean) {
|
||||
|
@@ -440,7 +440,7 @@ Object nvim_get_vvar(String name, Error *err)
|
||||
///
|
||||
/// @param name Option name
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return Option value
|
||||
/// @return Option value (global)
|
||||
Object nvim_get_option(String name, Error *err)
|
||||
FUNC_API_SINCE(1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user