From 700a02bd83248428c95ceea51c9372f0ea4c6cc7 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 23 Jan 2023 09:38:44 +0000 Subject: refactor(optionstr.c): break up did_set_string_option 26 --- src/nvim/tag.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/nvim/tag.c') diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 18c7684584..197184c181 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -210,22 +210,20 @@ static Callback tfu_cb; // 'tagfunc' callback function /// Reads the 'tagfunc' option value and convert that to a callback value. /// Invoked when the 'tagfunc' option is set. The option value can be a name of /// a function (string), or function() or funcref() or a lambda. -int set_tagfunc_option(void) +void set_tagfunc_option(char **errmsg) { callback_free(&tfu_cb); callback_free(&curbuf->b_tfu_cb); if (*curbuf->b_p_tfu == NUL) { - return OK; + return; } if (option_set_callback_func(curbuf->b_p_tfu, &tfu_cb) == FAIL) { - return FAIL; + *errmsg = e_invarg; } callback_copy(&curbuf->b_tfu_cb, &tfu_cb); - - return OK; } #if defined(EXITFREE) -- cgit