vim-patch:8.0.0143 (#7120)

Problem:    Line number of current buffer in getbufinfo() is wrong.
Solution:   For the current buffer use the current line number. (Ken Takata)

f845b87f2b
This commit is contained in:
KunMing Xie 2017-08-07 05:04:50 +08:00 committed by Justin M. Keyes
parent d1f0b5aa5d
commit 644fa6537c
2 changed files with 3 additions and 2 deletions

View File

@ -9079,7 +9079,8 @@ static dict_T *get_buffer_info(buf_T *buf)
tv_dict_add_nr(dict, S_LEN("bufnr"), buf->b_fnum);
tv_dict_add_str(dict, S_LEN("name"),
buf->b_ffname != NULL ? (const char *)buf->b_ffname : "");
tv_dict_add_nr(dict, S_LEN("lnum"), buflist_findlnum(buf));
tv_dict_add_nr(dict, S_LEN("lnum"),
buf == curbuf ? curwin->w_cursor.lnum : buflist_findlnum(buf));
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));

View File

@ -809,7 +809,7 @@ static const int included_patches[] = {
146,
// 145 NA
// 144 NA
// 143,
143,
// 142,
// 141,
// 140,