ugrid: Increase cell size to allow unicode composition

Close #3323
This commit is contained in:
Thiago de Arruda 2015-09-11 07:51:40 -03:00
parent 1b1716477c
commit 1f90cbb4ae
2 changed files with 4 additions and 2 deletions

View File

@ -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;
};

View File

@ -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));