summaryrefslogtreecommitdiff
path: root/src/evalbuffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-04 18:35:26 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-04 18:35:26 +0200
commitfe136c9a85412f4bdb5de70ef8416af5fa382b28 (patch)
treeed8e13e406f5623d3f9d0665dae559f979dad06f /src/evalbuffer.c
parentb936b79424d435b83cdebed5507a9d3800e66e6c (diff)
downloadvim-git-fe136c9a85412f4bdb5de70ef8416af5fa382b28.tar.gz
patch 8.2.1590: Vim9: bufnr() doesn't take "true" argumentv8.2.1590
Problem: Vim9: bufnr() doesn't take "true" argument. Solution: use tv_get_bool_chk(). (closes #6863)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r--src/evalbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index 300441551..4ca68c8bb 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -391,7 +391,7 @@ f_bufnr(typval_T *argvars, typval_T *rettv)
// new buffer.
if (buf == NULL
&& argvars[1].v_type != VAR_UNKNOWN
- && tv_get_number_chk(&argvars[1], &error) != 0
+ && tv_get_bool_chk(&argvars[1], &error) != 0
&& !error
&& (name = tv_get_string_chk(&argvars[0])) != NULL
&& !error)