Mercurial > vim
diff src/evalfunc.c @ 9904:24900147aa44 v7.4.2226
commit https://github.com/vim/vim/commit/339288377072f66ec88e21903e75a82d23ffbf4f
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 18 21:22:04 2016 +0200
patch 7.4.2226
Problem: The field names used by getbufinfo(), gettabinfo() and
getwininfo() are not consistent.
Solution: Use bufnr, winnr and tabnr. (Yegappan Lakshmanan)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 18 Aug 2016 21:30:07 +0200 |
parents | daecffbd0322 |
children | 885e3c9c0e10 |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3931,7 +3931,7 @@ get_buffer_info(buf_T *buf) if (dict == NULL) return NULL; - dict_add_nr_str(dict, "nr", buf->b_fnum, NULL); + 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); @@ -5001,7 +5001,7 @@ get_tabpage_info(tabpage_T *tp, int tp_i if (dict == NULL) return NULL; - dict_add_nr_str(dict, "nr", tp_idx, NULL); + dict_add_nr_str(dict, "tabnr", tp_idx, NULL); l = list_alloc(); if (l != NULL) @@ -5125,12 +5125,12 @@ get_win_info(win_T *wp, short tpnr, shor if (dict == NULL) return NULL; - dict_add_nr_str(dict, "tpnr", tpnr, NULL); - dict_add_nr_str(dict, "nr", winnr, NULL); + dict_add_nr_str(dict, "tabnr", tpnr, NULL); + dict_add_nr_str(dict, "winnr", winnr, NULL); dict_add_nr_str(dict, "winid", wp->w_id, NULL); dict_add_nr_str(dict, "height", wp->w_height, NULL); dict_add_nr_str(dict, "width", wp->w_width, NULL); - dict_add_nr_str(dict, "bufnum", wp->w_buffer->b_fnum, NULL); + dict_add_nr_str(dict, "bufnr", wp->w_buffer->b_fnum, NULL); #ifdef FEAT_QUICKFIX dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL);