Skip to content

Commit f845b87

Browse files
committed
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)
1 parent 0cdb72a commit f845b87

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/evalfunc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,8 @@ get_buffer_info(buf_T *buf)
39733973
dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL);
39743974
dict_add_nr_str(dict, "name", 0L,
39753975
buf->b_ffname != NULL ? buf->b_ffname : (char_u *)"");
3976-
dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL);
3976+
dict_add_nr_str(dict, "lnum", buf == curbuf ? curwin->w_cursor.lnum
3977+
: buflist_findlnum(buf), NULL);
39773978
dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL);
39783979
dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL);
39793980
dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
143,
767769
/**/
768770
142,
769771
/**/

0 commit comments

Comments
 (0)