mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 9.0.0090: no error when assigning bool to a string option
Problem: No error when assigning bool to a string option with setwinvar(). Solution: Give an error (closes #10766)
This commit is contained in:
@@ -4223,6 +4223,11 @@ set_option_from_tv(char_u *varname, typval_T *varp)
|
||||
|
||||
if (varp->v_type == VAR_BOOL)
|
||||
{
|
||||
if (is_string_option(varname))
|
||||
{
|
||||
emsg(_(e_string_required));
|
||||
return;
|
||||
}
|
||||
numval = (long)varp->vval.v_number;
|
||||
strval = (char_u *)"0"; // avoid using "false"
|
||||
}
|
||||
|
Reference in New Issue
Block a user