vim-patch:8.2.1576: Vim9: index() does not take "true" as argument

Problem:    Vim9: index() does not take "true" as argument.
Solution:   Use tv_get_bool_chk(). (closes vim/vim#6823)

https://github.com/vim/vim/commit/6c553f9c04a698ac2e19584f8ea8e2cb7cd98c80

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2026-08-08 00:25:18 -04:00
co-authored by Bram Moolenaar
parent b055504d41
commit ecbae9911e
+1 -1
View File
@@ -2838,7 +2838,7 @@ static void f_index(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
assert(item != NULL);
}
if (argvars[3].v_type != VAR_UNKNOWN) {
ic = !!tv_get_number_chk(&argvars[3], &error);
ic = !!tv_get_bool_chk(&argvars[3], &error);
if (error) {
item = NULL;
}