summaryrefslogtreecommitdiff
path: root/src/evalbuffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-05 17:37:07 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-05 17:37:07 +0200
commit036c2cf719e3de445779a275514030be66e26883 (patch)
tree419d8eda79525cbcc938423cca698e9b9206af92 /src/evalbuffer.c
parent2df47310422f4a77e85de7901a5299923a1addd3 (diff)
downloadvim-git-036c2cf719e3de445779a275514030be66e26883.tar.gz
patch 8.2.1602: Vim9: cannot use 'true" with getbufinfo()v8.2.1602
Problem: Vim9: cannot use 'true" with getbufinfo(). Solution: Use dict_get_bool(). (closes #6873)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r--src/evalbuffer.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index 4ca68c8bb..34155b9cb 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -624,21 +624,11 @@ f_getbufinfo(typval_T *argvars, typval_T *rettv)
if (sel_d != NULL)
{
- dictitem_T *di;
-
filtered = TRUE;
-
- di = dict_find(sel_d, (char_u *)"buflisted", -1);
- if (di != NULL && tv_get_number(&di->di_tv))
- sel_buflisted = TRUE;
-
- di = dict_find(sel_d, (char_u *)"bufloaded", -1);
- if (di != NULL && tv_get_number(&di->di_tv))
- sel_bufloaded = TRUE;
-
- di = dict_find(sel_d, (char_u *)"bufmodified", -1);
- if (di != NULL && tv_get_number(&di->di_tv))
- sel_bufmodified = TRUE;
+ sel_buflisted = dict_get_bool(sel_d, (char_u *)"buflisted", FALSE);
+ sel_bufloaded = dict_get_bool(sel_d, (char_u *)"bufloaded", FALSE);
+ sel_bufmodified = dict_get_bool(sel_d, (char_u *)"bufmodified",
+ FALSE);
}
}
else if (argvars[0].v_type != VAR_UNKNOWN)