aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-20 00:02:36 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-20 08:14:54 -0500
commitc147806e23d0ade781b8a298924150fe8d5887ad (patch)
tree463c49d6c557b1593ffd3c597ffd4fe163643be8 /src/nvim/eval.c
parent026ba804d173c41ab99ee270c93f7975c1d6d713 (diff)
downloadrneovim-c147806e23d0ade781b8a298924150fe8d5887ad.tar.gz
rneovim-c147806e23d0ade781b8a298924150fe8d5887ad.tar.bz2
rneovim-c147806e23d0ade781b8a298924150fe8d5887ad.zip
vim-patch:8.2.0019: cannot number of lines of another buffer
Problem: Cannot number of lines of another buffer. Solution: Add "linecount" to getbufinfo(). (Yasuhiro Matsumoto, closes vim/vim#5370) https://github.com/vim/vim/commit/a9e9679de3ef082ee29868ab404283dfc53258f2
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c1
1 files changed, 1 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));