0
0
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:
zeertzjq
2023-06-14 16:39:54 +01:00
committed by Bram Moolenaar
parent 8d687a7424
commit 4c7cb372c1
9 changed files with 161 additions and 124 deletions

View File

@@ -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".