aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-08-07 05:04:50 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-08-06 23:04:50 +0200
commit644fa6537cfda6281f6ac6c837b9a08fa35fb516 (patch)
treec65c95c69ee55d0e8027d54a6c33640fdad43ce5 /src
parentd1f0b5aa5d594f3041c3fc6c026ff720c07beaeb (diff)
downloadrneovim-644fa6537cfda6281f6ac6c837b9a08fa35fb516.tar.gz
rneovim-644fa6537cfda6281f6ac6c837b9a08fa35fb516.tar.bz2
rneovim-644fa6537cfda6281f6ac6c837b9a08fa35fb516.zip
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) https://github.com/vim/vim/commit/f845b87f2b3a45cbee160e28d7a3f50e54054809
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c3
-rw-r--r--src/nvim/version.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 78c8dd02db..ef3a8cada1 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -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));
diff --git a/src/nvim/version.c b/src/nvim/version.c
index fd2f1fd212..aa7c613f3a 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -809,7 +809,7 @@ static const int included_patches[] = {
146,
// 145 NA
// 144 NA
- // 143,
+ 143,
// 142,
// 141,
// 140,