Mercurial > vim
comparison src/evalbuffer.c @ 22105:bae2a3fa141f v8.2.1602
patch 8.2.1602: Vim9: cannot use 'true" with getbufinfo()
Commit: https://github.com/vim/vim/commit/036c2cf719e3de445779a275514030be66e26883
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 17:37:07 2020 +0200
patch 8.2.1602: Vim9: cannot use 'true" with getbufinfo()
Problem: Vim9: cannot use 'true" with getbufinfo().
Solution: Use dict_get_bool(). (closes https://github.com/vim/vim/issues/6873)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 17:45:04 +0200 |
parents | 2b9a2bc77b42 |
children | 9fa3f92248f6 |
comparison
equal
deleted
inserted
replaced
22104:c3f27d28745a | 22105:bae2a3fa141f |
---|---|
622 { | 622 { |
623 dict_T *sel_d = argvars[0].vval.v_dict; | 623 dict_T *sel_d = argvars[0].vval.v_dict; |
624 | 624 |
625 if (sel_d != NULL) | 625 if (sel_d != NULL) |
626 { | 626 { |
627 dictitem_T *di; | |
628 | |
629 filtered = TRUE; | 627 filtered = TRUE; |
630 | 628 sel_buflisted = dict_get_bool(sel_d, (char_u *)"buflisted", FALSE); |
631 di = dict_find(sel_d, (char_u *)"buflisted", -1); | 629 sel_bufloaded = dict_get_bool(sel_d, (char_u *)"bufloaded", FALSE); |
632 if (di != NULL && tv_get_number(&di->di_tv)) | 630 sel_bufmodified = dict_get_bool(sel_d, (char_u *)"bufmodified", |
633 sel_buflisted = TRUE; | 631 FALSE); |
634 | |
635 di = dict_find(sel_d, (char_u *)"bufloaded", -1); | |
636 if (di != NULL && tv_get_number(&di->di_tv)) | |
637 sel_bufloaded = TRUE; | |
638 | |
639 di = dict_find(sel_d, (char_u *)"bufmodified", -1); | |
640 if (di != NULL && tv_get_number(&di->di_tv)) | |
641 sel_bufmodified = TRUE; | |
642 } | 632 } |
643 } | 633 } |
644 else if (argvars[0].v_type != VAR_UNKNOWN) | 634 else if (argvars[0].v_type != VAR_UNKNOWN) |
645 { | 635 { |
646 // Information about one buffer. Argument specifies the buffer | 636 // Information about one buffer. Argument specifies the buffer |