diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-10-30 20:06:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 20:06:57 +0100 |
commit | 6d1a2f2c3c51560555ea6f7867273635d07eb287 (patch) | |
tree | b1a29752324ea1f455a77b5b46e545bc372e5c4b /src/nvim/api/deprecated.c | |
parent | 788bc12a6f4c5a4627cbc75a2f539bfc622384a2 (diff) | |
parent | e19cc9c9b715d8171f7940632b8855104b5290b6 (diff) | |
download | rneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.tar.gz rneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.tar.bz2 rneovim-6d1a2f2c3c51560555ea6f7867273635d07eb287.zip |
Merge pull request #25674 from famiu/refactor/options/unify_string_options
refactor(options): unify `set_option` and `set_string_option`
Diffstat (limited to 'src/nvim/api/deprecated.c')
-rw-r--r-- | src/nvim/api/deprecated.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c index 31ba20f627..59b7fc18d6 100644 --- a/src/nvim/api/deprecated.c +++ b/src/nvim/api/deprecated.c @@ -681,21 +681,6 @@ static void set_option_to(uint64_t channel_id, void *to, OptReqScope req_scope, return; }); - if (value.type == kObjectTypeNil) { - if (req_scope == kOptReqGlobal) { - api_set_error(err, kErrorTypeException, "Cannot unset option '%s'", name.data); - return; - } else if (!(flags & SOPT_GLOBAL)) { - api_set_error(err, kErrorTypeException, - "Cannot unset option '%s' because it doesn't have a global value", - name.data); - return; - } else { - unset_global_local_option(name.data, to); - return; - } - } - bool error = false; OptVal optval = object_as_optval(value, &error); |