diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-14 16:39:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-06-14 16:39:54 +0100 |
commit | 4c7cb372c17a84c8a35254d93eb37cb854cd39da (patch) | |
tree | ea5cfdba66516bd04a26c9b44df27160c7aa3fa0 /src/option.c | |
parent | 8d687a7424b33b7ad7f6778b0c5d092a44f4bc3a (diff) |
patch 9.0.1631: passing wrong variable type to option gives multiple errorsv9.0.1631
Problem: Passing a wrong variable type to an option gives multiple errors.
Solution: Bail out early on failure. (closes #12504)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/option.c b/src/option.c index c10687f6fd..e9c6a50add 100644 --- a/src/option.c +++ b/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". |