diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-09-11 07:51:40 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-09-18 14:35:26 -0300 |
commit | 1f90cbb4aed1eb047b36eb4b41e2ad02f9ae3a4f (patch) | |
tree | 8896177dc94b462aea51e98f7fd16dbb842c4291 | |
parent | 1b1716477cfdb81735d95c4201c59f9176845f54 (diff) | |
download | rneovim-1f90cbb4aed1eb047b36eb4b41e2ad02f9ae3a4f.tar.gz rneovim-1f90cbb4aed1eb047b36eb4b41e2ad02f9ae3a4f.tar.bz2 rneovim-1f90cbb4aed1eb047b36eb4b41e2ad02f9ae3a4f.zip |
ugrid: Increase cell size to allow unicode composition
Close #3323
-rw-r--r-- | src/nvim/ugrid.h | 3 | ||||
-rw-r--r-- | src/nvim/ui_bridge.c | 3 |
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)); |