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:
Jakob Schnitzer
2017-03-30 22:03:52 +02:00
committed by Justin M. Keyes
parent 66b336d89b
commit eb0e94f71b
5 changed files with 40 additions and 16 deletions

View File

@@ -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) {