comparison 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
comparison
equal deleted inserted replaced
9903:fee4b54981cd 9904:24900147aa44
3929 3929
3930 dict = dict_alloc(); 3930 dict = dict_alloc();
3931 if (dict == NULL) 3931 if (dict == NULL)
3932 return NULL; 3932 return NULL;
3933 3933
3934 dict_add_nr_str(dict, "nr", buf->b_fnum, NULL); 3934 dict_add_nr_str(dict, "bufnr", buf->b_fnum, NULL);
3935 dict_add_nr_str(dict, "name", 0L, 3935 dict_add_nr_str(dict, "name", 0L,
3936 buf->b_ffname != NULL ? buf->b_ffname : (char_u *)""); 3936 buf->b_ffname != NULL ? buf->b_ffname : (char_u *)"");
3937 dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL); 3937 dict_add_nr_str(dict, "lnum", buflist_findlnum(buf), NULL);
3938 dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL); 3938 dict_add_nr_str(dict, "loaded", buf->b_ml.ml_mfp != NULL, NULL);
3939 dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL); 3939 dict_add_nr_str(dict, "listed", buf->b_p_bl, NULL);
4999 4999
5000 dict = dict_alloc(); 5000 dict = dict_alloc();
5001 if (dict == NULL) 5001 if (dict == NULL)
5002 return NULL; 5002 return NULL;
5003 5003
5004 dict_add_nr_str(dict, "nr", tp_idx, NULL); 5004 dict_add_nr_str(dict, "tabnr", tp_idx, NULL);
5005 5005
5006 l = list_alloc(); 5006 l = list_alloc();
5007 if (l != NULL) 5007 if (l != NULL)
5008 { 5008 {
5009 for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin; 5009 for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
5123 5123
5124 dict = dict_alloc(); 5124 dict = dict_alloc();
5125 if (dict == NULL) 5125 if (dict == NULL)
5126 return NULL; 5126 return NULL;
5127 5127
5128 dict_add_nr_str(dict, "tpnr", tpnr, NULL); 5128 dict_add_nr_str(dict, "tabnr", tpnr, NULL);
5129 dict_add_nr_str(dict, "nr", winnr, NULL); 5129 dict_add_nr_str(dict, "winnr", winnr, NULL);
5130 dict_add_nr_str(dict, "winid", wp->w_id, NULL); 5130 dict_add_nr_str(dict, "winid", wp->w_id, NULL);
5131 dict_add_nr_str(dict, "height", wp->w_height, NULL); 5131 dict_add_nr_str(dict, "height", wp->w_height, NULL);
5132 dict_add_nr_str(dict, "width", wp->w_width, NULL); 5132 dict_add_nr_str(dict, "width", wp->w_width, NULL);
5133 dict_add_nr_str(dict, "bufnum", wp->w_buffer->b_fnum, NULL); 5133 dict_add_nr_str(dict, "bufnr", wp->w_buffer->b_fnum, NULL);
5134 5134
5135 #ifdef FEAT_QUICKFIX 5135 #ifdef FEAT_QUICKFIX
5136 dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL); 5136 dict_add_nr_str(dict, "quickfix", bt_quickfix(wp->w_buffer), NULL);
5137 dict_add_nr_str(dict, "loclist", 5137 dict_add_nr_str(dict, "loclist",
5138 (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL), NULL); 5138 (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL), NULL);