# HG changeset patch # User Christian Brabandt # Date 1483708504 -3600 # Node ID cd36f3024b06a001f662e8753fe97a7e159fb86c # Parent a226971febc9dfe218c1a9f768d0255356696657 commit https://github.com/vim/vim/commit/f845b87f2b3a45cbee160e28d7a3f50e54054809 Author: Bram Moolenaar Date: Fri Jan 6 14:04:54 2017 +0100 patch 8.0.0143: line number of current buffer in getbufinfo() is wrong Problem: Line number of current buffer in getbufinfo() is wrong. Solution: For the current buffer use the current line number. (Ken Takata) diff --git a/src/evalfunc.c b/src/evalfunc.c --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3973,7 +3973,8 @@ get_buffer_info(buf_T *buf) dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL); dict_add_nr_str(dict, "name", 0L, buf->b_ffname != NULL ? buf->b_ffname : (char_u *)""); - dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL); + dict_add_nr_str(dict, "lnum", buf == curbuf ? curwin->w_cursor.lnum + : buflist_findlnum(buf), NULL); dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL); dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL); dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 143, +/**/ 142, /**/ 141,