summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-05 18:45:29 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-05 18:45:29 +0200
commit04637e243d39f791cfc97c3ce96d99ef1bf047e1 (patch)
tree9a0b639ceed7fdde69ca0deeaa9c2bfd9e5404c0 /src/evalfunc.c
parentb02628b8a20ad0c42a097207b3b49ae5169d04d7 (diff)
downloadvim-git-04637e243d39f791cfc97c3ce96d99ef1bf047e1.tar.gz
patch 8.2.1606: Vim9: cannot use "true" with has()v8.2.1606
Problem: Vim9: cannot use "true" with has(). Solution: Use tv_get_bool(). (closes #6876)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index aefb1bf4b..9e384da49 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -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