aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/deprecated.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api/deprecated.c')
-rw-r--r--src/nvim/api/deprecated.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c
index 47a49436ab..d5eddb74de 100644
--- a/src/nvim/api/deprecated.c
+++ b/src/nvim/api/deprecated.c
@@ -649,8 +649,8 @@ static Object get_option_from(void *from, OptScope scope, String name, Error *er
OptVal value = NIL_OPTVAL;
if (option_has_scope(opt_idx, scope)) {
- value = get_option_value_from(opt_idx, option_ctx_from(scope, from),
- scope == kOptScopeGlobal ? OPT_GLOBAL : OPT_LOCAL);
+ value = get_option_value_for(opt_idx, scope == kOptScopeGlobal ? OPT_GLOBAL : OPT_LOCAL,
+ scope, from, err);
if (ERROR_SET(err)) {
return (Object)OBJECT_INIT;
}
@@ -701,11 +701,7 @@ static void set_option_to(uint64_t channel_id, void *to, OptScope scope, String
: ((scope == kOptScopeGlobal) ? OPT_GLOBAL : OPT_LOCAL);
WITH_SCRIPT_CONTEXT(channel_id, {
- const char *errmsg
- = set_option_value_for(opt_idx, optval, option_ctx_from(scope, to), opt_flags);
- if (errmsg) {
- api_set_error(err, kErrorTypeException, "%s", errmsg);
- }
+ set_option_value_for(name.data, opt_idx, optval, opt_flags, scope, to, err);
});
}