diff options
author | Jakob Schnitzer <mail@jakobschnitzer.de> | 2017-03-30 22:03:52 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-30 22:03:52 +0200 |
commit | eb0e94f71b1f44cebf7ae5c1bcff348264af6cef (patch) | |
tree | 2d904e9a1409f24389a48bf4a31f9822301a3745 /src/nvim/api/private/helpers.c | |
parent | 66b336d89bd5b45e60587b3c1689c7435019d775 (diff) | |
download | rneovim-eb0e94f71b1f44cebf7ae5c1bcff348264af6cef.tar.gz rneovim-eb0e94f71b1f44cebf7ae5c1bcff348264af6cef.tar.bz2 rneovim-eb0e94f71b1f44cebf7ae5c1bcff348264af6cef.zip |
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.
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index b245132ba7..fe15b28041 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -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) { |