mirror of
https://github.com/vim/vim.git
synced 2025-10-12 06:44:06 -04:00
patch 8.2.1606: Vim9: cannot use "true" with has()
Problem: Vim9: cannot use "true" with has(). Solution: Use tv_get_bool(). (closes #6876)
This commit is contained in:
@@ -4763,7 +4763,7 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
}
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN && tv_get_number(&argvars[1]) != 0)
|
||||
if (argvars[1].v_type != VAR_UNKNOWN && tv_get_bool(&argvars[1]))
|
||||
// return whether feature could ever be enabled
|
||||
rettv->vval.v_number = x;
|
||||
else
|
||||
|
Reference in New Issue
Block a user