mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
af93691b53
This commit is contained in:
@@ -5628,11 +5628,12 @@ static void op_colon(oparg_T *oap)
|
||||
static Callback opfunc_cb;
|
||||
|
||||
/// Process the 'operatorfunc' option value.
|
||||
void set_operatorfunc_option(const char **errmsg)
|
||||
const char *did_set_operatorfunc(optset_T *args FUNC_ATTR_UNUSED)
|
||||
{
|
||||
if (option_set_callback_func(p_opfunc, &opfunc_cb) == FAIL) {
|
||||
*errmsg = e_invarg;
|
||||
return e_invarg;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(EXITFREE)
|
||||
|
Reference in New Issue
Block a user