diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 38b2783da7bdae3bc409ece30c9d9428a4bb41bc..5be18bd796e6a21b95b16a640e1f9d7bc001f6e0 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4929,8 +4929,11 @@ getbufinfo([{dict}]) < To get buffer-local options use: > getbufvar({bufnr}, '&option_name') - < + Can also be used as a |method|: > + GetBufnr()->getbufinfo() +< + *getbufline()* getbufline({expr}, {lnum} [, {end}]) Return a |List| with the lines starting from {lnum} to {end} diff --git a/src/evalfunc.c b/src/evalfunc.c index 3f38fa7f54f02ba98338a858331eb4bb45e2f2a3..5de49c5d5f60a008063a773957d2522fb21c6168 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 43d0473a141ec031561d6105a0d6f5db7e308798..eafadff63f2abfdf97da688bab2fd3f4ba0ecd19 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 1b16ffb3e8a35c54bc9f09a5c5a6b685314e180a..2d0fbb2e4284f79a65b6e6b0678a77f020e35be2 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1241, /**/ 1240, /**/