diff options
author | Matthieu Coudron <mattator@gmail.com> | 2019-12-20 17:25:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-20 17:25:43 +0100 |
commit | 416de695f9e71e494e3b6e4187e850e560abf7af (patch) | |
tree | fab49208afdef97f634baf9cdfcd2b762784f6df /src | |
parent | 026ba804d173c41ab99ee270c93f7975c1d6d713 (diff) | |
parent | a115f2314387706242ce5b9e5b2d7090a902d9cb (diff) | |
download | rneovim-416de695f9e71e494e3b6e4187e850e560abf7af.tar.gz rneovim-416de695f9e71e494e3b6e4187e850e560abf7af.tar.bz2 rneovim-416de695f9e71e494e3b6e4187e850e560abf7af.zip |
Merge pull request #11577 from janlazo/vim-8.2.0019
vim-patch:8.2.{19,24}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_bufwintabinfo.vim | 10 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 902d68dcf9..04899f2c99 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -9922,6 +9922,7 @@ static dict_T *get_buffer_info(buf_T *buf) buf->b_ffname != NULL ? (const char *)buf->b_ffname : ""); tv_dict_add_nr(dict, S_LEN("lnum"), buf == curbuf ? curwin->w_cursor.lnum : buflist_findlnum(buf)); + tv_dict_add_nr(dict, S_LEN("linecount"), buf->b_ml.ml_line_count); tv_dict_add_nr(dict, S_LEN("loaded"), buf->b_ml.ml_mfp != NULL); tv_dict_add_nr(dict, S_LEN("listed"), buf->b_p_bl); tv_dict_add_nr(dict, S_LEN("changed"), bufIsChanged(buf)); diff --git a/src/nvim/testdir/test_bufwintabinfo.vim b/src/nvim/testdir/test_bufwintabinfo.vim index 0e8c7d1dc1..176d49d28e 100644 --- a/src/nvim/testdir/test_bufwintabinfo.vim +++ b/src/nvim/testdir/test_bufwintabinfo.vim @@ -139,3 +139,13 @@ function Test_get_win_options() set foldlevel=0 endif endfunc + +func Test_getbufinfo_lines() + new Xfoo + call setline(1, ['a', 'bc', 'd']) + let bn = bufnr('%') + hide + call assert_equal(3, getbufinfo(bn)[0]["linecount"]) + edit Xfoo + bw! +endfunc diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index e085f58e56..cc0037b4cf 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -364,6 +364,7 @@ let s:filename_checks = { \ 'rcs': ['file,v'], \ 'readline': ['.inputrc', 'inputrc'], \ 'remind': ['.reminders', 'file.remind', 'file.rem'], + \ 'rego': ['file.rego'], \ 'resolv': ['resolv.conf'], \ 'reva': ['file.frt'], \ 'rexx': ['file.rex', 'file.orx', 'file.rxo', 'file.rxj', 'file.jrexx', 'file.rexxj', 'file.rexx', 'file.testGroup', 'file.testUnit'], |