aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ugrid.h3
-rw-r--r--src/nvim/ui_bridge.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h
index e41461fa16..df51e1fced 100644
--- a/src/nvim/ugrid.h
+++ b/src/nvim/ugrid.h
@@ -2,12 +2,13 @@
#define NVIM_UGRID_H
#include "nvim/ui.h"
+#include "nvim/globals.h"
typedef struct ucell UCell;
typedef struct ugrid UGrid;
struct ucell {
- char data[7];
+ char data[6 * MAX_MCO + 1];
HlAttrs attrs;
};
diff --git a/src/nvim/ui_bridge.c b/src/nvim/ui_bridge.c
index 58345b5efa..836339a887 100644
--- a/src/nvim/ui_bridge.c
+++ b/src/nvim/ui_bridge.c
@@ -9,6 +9,7 @@
#include "nvim/ui.h"
#include "nvim/memory.h"
#include "nvim/ui_bridge.h"
+#include "nvim/ugrid.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_bridge.c.generated.h"
@@ -235,7 +236,7 @@ static void ui_bridge_put(UI *b, uint8_t *text, size_t size)
{
uint8_t *t = NULL;
if (text) {
- t = xmalloc(8);
+ t = xmalloc(sizeof(((UCell *)0)->data));
memcpy(t, text, size);
}
UI_CALL(b, put, 3, b, t, INT2PTR(size));