Mercurial > vim
comparison src/evalfunc.c @ 10501:cd36f3024b06 v8.0.0143
commit https://github.com/vim/vim/commit/f845b87f2b3a45cbee160e28d7a3f50e54054809
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 06 Jan 2017 14:15:04 +0100 |
parents | 0d345265b1e2 |
children | 1435e45ee6fa |
comparison
equal
deleted
inserted
replaced
10500:a226971febc9 | 10501:cd36f3024b06 |
---|---|
3971 return NULL; | 3971 return NULL; |
3972 | 3972 |
3973 dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL); | 3973 dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL); |
3974 dict_add_nr_str(dict, "name", 0L, | 3974 dict_add_nr_str(dict, "name", 0L, |
3975 buf->b_ffname != NULL ? buf->b_ffname : (char_u *)""); | 3975 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); | |
3977 dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL); | 3978 dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL); |
3978 dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL); | 3979 dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL); |
3979 dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL); | 3980 dict_add_nr_str(dict, "changed", bufIsChanged(buf), NULL); |
3980 dict_add_nr_str(dict, "changedtick", buf->b_changedtick, NULL); | 3981 dict_add_nr_str(dict, "changedtick", buf->b_changedtick, NULL); |
3981 dict_add_nr_str(dict, "hidden", | 3982 dict_add_nr_str(dict, "hidden", |