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) {