aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_compositor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui_compositor.c')
-rw-r--r--src/nvim/ui_compositor.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c
index b698e017dc..6e89894e0b 100644
--- a/src/nvim/ui_compositor.c
+++ b/src/nvim/ui_compositor.c
@@ -9,14 +9,16 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
+#include <uv.h>
#include "klib/kvec.h"
#include "nvim/api/private/defs.h"
#include "nvim/ascii_defs.h"
+#include "nvim/buffer_defs.h"
#include "nvim/globals.h"
#include "nvim/grid.h"
#include "nvim/highlight.h"
+#include "nvim/highlight_defs.h"
#include "nvim/highlight_group.h"
#include "nvim/log.h"
#include "nvim/macros_defs.h"
@@ -60,6 +62,15 @@ void ui_comp_init(void)
curgrid = &default_grid;
}
+#ifdef EXITFREE
+void ui_comp_free_all_mem(void)
+{
+ kv_destroy(layers);
+ xfree(linebuf);
+ xfree(attrbuf);
+}
+#endif
+
void ui_comp_syn_init(void)
{
dbghl_normal = syn_check_group(S_LEN("RedrawDebugNormal"));
@@ -68,13 +79,13 @@ void ui_comp_syn_init(void)
dbghl_recompose = syn_check_group(S_LEN("RedrawDebugRecompose"));
}
-void ui_comp_attach(UI *ui)
+void ui_comp_attach(RemoteUI *ui)
{
composed_uis++;
ui->composed = true;
}
-void ui_comp_detach(UI *ui)
+void ui_comp_detach(RemoteUI *ui)
{
composed_uis--;
if (composed_uis == 0) {
@@ -296,7 +307,8 @@ static void compose_line(Integer row, Integer startcol, Integer endcol, LineFlag
startcol = MAX(startcol, 0);
// in case we start on the right half of a double-width char, we need to
// check the left half. But skip it in output if it wasn't doublewidth.
- int skipstart = 0, skipend = 0;
+ int skipstart = 0;
+ int skipend = 0;
if (startcol > 0 && (flags & kLineFlagInvalid)) {
startcol--;
skipstart = 1;