0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #5370)
This commit is contained in:
Bram Moolenaar
2019-12-17 22:40:15 +01:00
parent 91b65e4944
commit a9e9679de3
4 changed files with 15 additions and 0 deletions

View File

@@ -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));