aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/ui.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-02-09 12:40:48 +0100
committerbfredl <bjorn.linse@gmail.com>2024-02-09 18:24:21 +0100
commite9510211f0b957606685344be97350c29e3ea638 (patch)
tree52b3ccf23720512057d13bb91c5bbdd7aeed1a0c /src/nvim/api/ui.c
parente0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd (diff)
downloadrneovim-e9510211f0b957606685344be97350c29e3ea638.tar.gz
rneovim-e9510211f0b957606685344be97350c29e3ea638.tar.bz2
rneovim-e9510211f0b957606685344be97350c29e3ea638.zip
refactor(api): use arena for nvim_list_uis()
Diffstat (limited to 'src/nvim/api/ui.c')
-rw-r--r--src/nvim/api/ui.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index c6e868ca88..5c8ebfb861 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -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));
-}