mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
[RDY] Add buffer information to tabline_update (#12481)
* Add buffer information to tabline_update Most terminal implementations of the tabline display buffer and tab information. Many neovim-qt users disable GuiTabline because it lacks functionality provided in the terminal implementation. The tabline_update event should include buffer information too, so client GUIs can display rich useful tabs.
This commit is contained in:
@@ -7211,7 +7211,24 @@ void ui_ext_tabline_update(void)
|
||||
|
||||
ADD(tabs, DICTIONARY_OBJ(tab_info));
|
||||
}
|
||||
ui_call_tabline_update(curtab->handle, tabs);
|
||||
|
||||
Array buffers = ARRAY_DICT_INIT;
|
||||
FOR_ALL_BUFFERS(buf) {
|
||||
// Do not include unlisted buffers
|
||||
if (!buf->b_p_bl) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Dictionary buffer_info = ARRAY_DICT_INIT;
|
||||
PUT(buffer_info, "buffer", BUFFER_OBJ(buf->handle));
|
||||
|
||||
get_trans_bufname(buf);
|
||||
PUT(buffer_info, "name", STRING_OBJ(cstr_to_string((char *)NameBuff)));
|
||||
|
||||
ADD(buffers, DICTIONARY_OBJ(buffer_info));
|
||||
}
|
||||
|
||||
ui_call_tabline_update(curtab->handle, tabs, curbuf->handle, buffers);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user