0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0611: crash when using terminal with long composing characters

Problem:    Crash when using terminal with long composing characters.
Solution:   Make space for all characters. (Yasuhiro Matsumoto, closes #3619,
            closes #3703)
This commit is contained in:
Bram Moolenaar
2018-12-20 20:47:32 +01:00
parent 6dc6703295
commit a79fd56923
2 changed files with 4 additions and 1 deletions

View File

@@ -1561,7 +1561,8 @@ update_snapshot(term_T *term)
cell2cellattr(&cell, &p[pos.col]);
if (ga_grow(&ga, MB_MAXBYTES) == OK)
// Each character can be up to 6 bytes.
if (ga_grow(&ga, VTERM_MAX_CHARS_PER_CELL * 6) == OK)
{
int i;
int c;