diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-01-03 18:57:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 18:57:55 +0100 |
commit | eb702273c4e862305c72b2b9354f7c3a32447135 (patch) | |
tree | 1fa22dc5adf583318a17ff1abf1cb82bdcf1ce34 /src/nvim/ui.c | |
parent | 1b3c255f608a6c1a4a31bcd4a640ea6696403341 (diff) | |
parent | b2295ac4ec80e141628cea33ebee81c96e168989 (diff) | |
download | rneovim-eb702273c4e862305c72b2b9354f7c3a32447135.tar.gz rneovim-eb702273c4e862305c72b2b9354f7c3a32447135.tar.bz2 rneovim-eb702273c4e862305c72b2b9354f7c3a32447135.zip |
Merge pull request #21631 from bfredl/request_memory
refactor(api): do not allocate temporaries for internal events
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index a28faf7890..0cb48a9cf4 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -227,9 +227,9 @@ void ui_refresh(void) if (ui_client_attached) { // TODO(bfredl): ui_refresh() should only be used on the server // we are in the client process. forward the resize - Array args = ARRAY_DICT_INIT; - ADD(args, INTEGER_OBJ((int)width)); - ADD(args, INTEGER_OBJ((int)height)); + MAXSIZE_TEMP_ARRAY(args, 2); + ADD_C(args, INTEGER_OBJ((int)width)); + ADD_C(args, INTEGER_OBJ((int)height)); rpc_send_event(ui_client_channel_id, "nvim_ui_try_resize", args); } else { /// TODO(bfredl): Messy! The screen does not yet exist, but we need to |