summaryrefslogtreecommitdiff
path: root/src/evalbuffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-17 22:40:15 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-17 22:40:15 +0100
commita9e9679de3ef082ee29868ab404283dfc53258f2 (patch)
treedbbddc9c73cbc409668aecc7fea3e123fb4fa46f /src/evalbuffer.c
parent91b65e49440e77222a65b6f868507453239f409b (diff)
downloadvim-git-a9e9679de3ef082ee29868ab404283dfc53258f2.tar.gz
patch 8.2.0019: cannot number of lines of another bufferv8.2.0019
Problem: Cannot number of lines of another buffer. Solution: Add "linecount" to getbufinfo(). (Yasuhiro Matsumoto, closes #5370)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r--src/evalbuffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index a475165f4..09db525e2 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -545,6 +545,7 @@ get_buffer_info(buf_T *buf)
dict_add_string(dict, "name", buf->b_ffname);
dict_add_number(dict, "lnum", buf == curbuf ? curwin->w_cursor.lnum
: buflist_findlnum(buf));
+ dict_add_number(dict, "linecount", buf->b_ml.ml_line_count);
dict_add_number(dict, "loaded", buf->b_ml.ml_mfp != NULL);
dict_add_number(dict, "listed", buf->b_p_bl);
dict_add_number(dict, "changed", bufIsChanged(buf));