aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index d968cbc390..031cdede07 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -35,6 +35,7 @@
#else
# include "nvim/msgpack_rpc/server.h"
#endif
+#include "nvim/api/private/helpers.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui.c.generated.h"
@@ -143,6 +144,15 @@ void ui_set_icon(char *icon)
UI_CALL(flush);
}
+void ui_event(char *name, Array args)
+{
+ bool args_consumed = false;
+ UI_CALL(event, name, args, &args_consumed);
+ if (!args_consumed) {
+ api_free_array(args);
+ }
+}
+
// May update the shape of the cursor.
void ui_cursor_shape(void)
{
@@ -519,3 +529,4 @@ static void ui_mode_change(void)
UI_CALL(mode_change, mode);
conceal_check_cursur_line();
}
+