api/ext_tabline: List of Dicts.

This commit is contained in:
Justin M. Keyes
2017-04-25 11:13:29 +02:00
parent c8e1af93de
commit 6944abad2f
4 changed files with 23 additions and 22 deletions

View File

@@ -7038,15 +7038,14 @@ void ui_ext_tabline_update(void)
ADD(args, INTEGER_OBJ(curtab->handle));
Array tabs = ARRAY_DICT_INIT;
FOR_ALL_TABS(tp) {
Dictionary tab_info = ARRAY_DICT_INIT;
PUT(tab_info, "tab", TABPAGE_OBJ(tp->handle));
win_T *cwp = (tp == curtab) ? curwin : tp->tp_curwin;
get_trans_bufname(cwp->w_buffer);
Array tab = ARRAY_DICT_INIT;
ADD(tab, INTEGER_OBJ(tp->handle));
Dictionary tab_info = ARRAY_DICT_INIT;
PUT(tab_info, "name", STRING_OBJ(cstr_to_string((char *)NameBuff)));
ADD(tab, DICTIONARY_OBJ(tab_info));
ADD(tabs, ARRAY_OBJ(tab));
ADD(tabs, DICTIONARY_OBJ(tab_info));
}
ADD(args, ARRAY_OBJ(tabs));