mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1631: passing wrong variable type to option gives multiple errors
Problem: Passing a wrong variable type to an option gives multiple errors. Solution: Bail out early on failure. (closes #12504)
This commit is contained in:
14
src/option.c
14
src/option.c
@@ -5462,20 +5462,6 @@ is_option_allocated(char *name)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* Return TRUE if "name" is a string option.
|
||||
* Returns FALSE if option "name" does not exist.
|
||||
*/
|
||||
int
|
||||
is_string_option(char_u *name)
|
||||
{
|
||||
int idx = findoption(name);
|
||||
|
||||
return idx >= 0 && (options[idx].flags & P_STRING);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number.
|
||||
* When "has_lt" is true there is a '<' before "*arg_arg".
|
||||
|
Reference in New Issue
Block a user