From d2b715bf1de31fc784b399d6aafb5f7e41aef6cc Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 9 May 2014 11:52:39 -0300 Subject: API: Implement vim_{get,set}_option Some functions from upstream VIM were reintegrated for this: - get_option_value_strict - set_option_value_err - set_option_value_for - unset_global_local_option --- src/api/vim.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/api/vim.c') diff --git a/src/api/vim.c b/src/api/vim.c index 93654da91f..7eaa27d580 100644 --- a/src/api/vim.c +++ b/src/api/vim.c @@ -139,19 +139,14 @@ Object vim_set_var(String name, Object value, Error *err) return dict_set_value(&globvardict, name, value, err); } -String vim_get_option(String name, Error *err) +Object vim_get_option(String name, Error *err) { - abort(); -} - -void vim_set_option(String name, String value, Error *err) -{ - abort(); + return get_option_from(NULL, SREQ_GLOBAL, name, err); } -void vim_del_option(String name, Error *err) +void vim_set_option(String name, Object value, Error *err) { - abort(); + set_option_to(NULL, SREQ_GLOBAL, name, value, err); } void vim_out_write(String str) -- cgit