mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user