diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-18 22:24:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-18 22:24:22 +0200 |
commit | 6434fc574dfbde11461e70e5a62712370edf38e6 (patch) | |
tree | f815722df00d589059fba4aa574e49db7e597be7 /src | |
parent | 10e1d01aaf5504675fd9197c75d1da0de0e5b429 (diff) |
patch 8.2.1241: cannot use getbufinfo() as a methodv8.2.1241
Problem: Cannot use getbufinfo() as a method.
Solution: Support using getbufinfo() as a method. (closes #6458)
Diffstat (limited to 'src')
-rw-r--r-- | src/evalfunc.c | 2 | ||||
-rw-r--r-- | src/testdir/test_bufwintabinfo.vim | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 3f38fa7f54..5de49c5d5f 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -611,7 +611,7 @@ static funcentry_T global_functions[] = {"function", 1, 3, FEARG_1, ret_f_function, f_function}, {"garbagecollect", 0, 1, 0, ret_void, f_garbagecollect}, {"get", 2, 3, FEARG_1, ret_any, f_get}, - {"getbufinfo", 0, 1, 0, ret_list_dict_any, f_getbufinfo}, + {"getbufinfo", 0, 1, FEARG_1, ret_list_dict_any, f_getbufinfo}, {"getbufline", 2, 3, FEARG_1, ret_list_string, f_getbufline}, {"getbufvar", 2, 3, FEARG_1, ret_any, f_getbufvar}, {"getchangelist", 0, 1, FEARG_1, ret_list_any, f_getchangelist}, diff --git a/src/testdir/test_bufwintabinfo.vim b/src/testdir/test_bufwintabinfo.vim index 43d0473a14..eafadff63f 100644 --- a/src/testdir/test_bufwintabinfo.vim +++ b/src/testdir/test_bufwintabinfo.vim @@ -23,6 +23,9 @@ func Test_getbufwintabinfo() call assert_equal('vim', l[0].variables.editor) call assert_notequal(-1, index(l[0].windows, '%'->bufwinid())) + let l = '%'->getbufinfo() + call assert_equal(bufnr('%'), l[0].bufnr) + " Test for getbufinfo() with 'bufmodified' call assert_equal(0, len(getbufinfo({'bufmodified' : 1}))) call setbufline('Xtestfile1', 1, ["Line1"]) diff --git a/src/version.c b/src/version.c index 1b16ffb3e8..2d0fbb2e42 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1241, +/**/ 1240, /**/ 1239, |