From e0cb9004ee45aec6e475791ccc56a552746ac242 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 7 Aug 2026 15:27:52 -0400 Subject: [PATCH] vim-patch:8.2.1571: Vim9: count() third argument cannot be "true" Problem: Vim9: count() third argument cannot be "true". Solution: use tv_get_bool_chk(). (closes vim/vim#6818) https://github.com/vim/vim/commit/119f5572306c4abba91eaf446c0c52637db223e8 Co-authored-by: Bram Moolenaar --- src/nvim/eval/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/eval/list.c b/src/nvim/eval/list.c index 0b7d01273f..79fdb2019c 100644 --- a/src/nvim/eval/list.c +++ b/src/nvim/eval/list.c @@ -540,7 +540,7 @@ void f_count(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) bool error = false; if (argvars[2].v_type != VAR_UNKNOWN) { - ic = (int)tv_get_number_chk(&argvars[2], &error); + ic = (int)tv_get_bool_chk(&argvars[2], &error); } if (!error && argvars[0].v_type == VAR_STRING) {