mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
refactor(api): use arena for nvim_list_uis()
This commit is contained in:
@@ -247,10 +247,9 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height, Dictiona
|
||||
void ui_attach(uint64_t channel_id, Integer width, Integer height, Boolean enable_rgb, Error *err)
|
||||
FUNC_API_DEPRECATED_SINCE(1)
|
||||
{
|
||||
Dictionary opts = ARRAY_DICT_INIT;
|
||||
PUT(opts, "rgb", BOOLEAN_OBJ(enable_rgb));
|
||||
MAXSIZE_TEMP_DICT(opts, 1);
|
||||
PUT_C(opts, "rgb", BOOLEAN_OBJ(enable_rgb));
|
||||
nvim_ui_attach(channel_id, width, height, opts, err);
|
||||
api_free_dictionary(opts);
|
||||
}
|
||||
|
||||
/// Tells the nvim server if focus was gained or lost by the GUI
|
||||
@@ -1113,9 +1112,3 @@ void remote_ui_event(UI *ui, char *name, Array args)
|
||||
free_ret:
|
||||
arena_mem_free(arena_finish(&arena));
|
||||
}
|
||||
|
||||
void remote_ui_inspect(UI *ui, Dictionary *info)
|
||||
{
|
||||
UIData *data = ui->data;
|
||||
PUT(*info, "chan", INTEGER_OBJ((Integer)data->channel_id));
|
||||
}
|
||||
|
@@ -1866,10 +1866,10 @@ Dictionary nvim__stats(Arena *arena)
|
||||
/// - "rgb" true if the UI uses RGB colors (false implies |cterm-colors|)
|
||||
/// - "ext_..." Requested UI extensions, see |ui-option|
|
||||
/// - "chan" |channel-id| of remote UI
|
||||
Array nvim_list_uis(void)
|
||||
Array nvim_list_uis(Arena *arena)
|
||||
FUNC_API_SINCE(4)
|
||||
{
|
||||
return ui_array();
|
||||
return ui_array(arena);
|
||||
}
|
||||
|
||||
/// Gets the immediate children of process `pid`.
|
||||
|
Reference in New Issue
Block a user