mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
nvim_list_uis: include channel id
This commit is contained in:
@@ -97,6 +97,7 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
|
||||
ui->set_icon = remote_ui_set_icon;
|
||||
ui->option_set = remote_ui_option_set;
|
||||
ui->event = remote_ui_event;
|
||||
ui->inspect = remote_ui_inspect;
|
||||
|
||||
memset(ui->ui_ext, 0, sizeof(ui->ui_ext));
|
||||
|
||||
@@ -275,3 +276,9 @@ static void remote_ui_event(UI *ui, char *name, Array args, bool *args_consumed)
|
||||
}
|
||||
push_call(ui, name, my_args);
|
||||
}
|
||||
|
||||
static void remote_ui_inspect(UI *ui, Dictionary *info)
|
||||
{
|
||||
UIData *data = ui->data;
|
||||
PUT(*info, "chan", INTEGER_OBJ((Integer)data->channel_id));
|
||||
}
|
||||
|
@@ -1747,6 +1747,14 @@ Dictionary nvim__stats(void)
|
||||
/// Gets a list of dictionaries representing attached UIs.
|
||||
///
|
||||
/// @return Array of UI dictionaries
|
||||
///
|
||||
/// Each dictionary has the following keys:
|
||||
/// - "height" requested height of the UI
|
||||
/// - "width" requested width of the UI
|
||||
/// - "rgb" whether the UI uses rgb colors (false implies cterm colors)
|
||||
/// - "ext_..." Requested UI extensions, see |ui-options|
|
||||
/// - "chan" Channel id of remote UI (not present for TUI)
|
||||
///
|
||||
Array nvim_list_uis(void)
|
||||
FUNC_API_SINCE(4)
|
||||
{
|
||||
|
Reference in New Issue
Block a user