Skip to content

Commit a79fd56

Browse files
committed
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)
1 parent 6dc6703 commit a79fd56

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/terminal.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,8 @@ update_snapshot(term_T *term)
15611561

15621562
cell2cellattr(&cell, &p[pos.col]);
15631563

1564-
if (ga_grow(&ga, MB_MAXBYTES) == OK)
1564+
// Each character can be up to 6 bytes.
1565+
if (ga_grow(&ga, VTERM_MAX_CHARS_PER_CELL * 6) == OK)
15651566
{
15661567
int i;
15671568
int c;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,8 @@ static char *(features[]) =
799799

800800
static int included_patches[] =
801801
{ /* Add new patch number below this line */
802+
/**/
803+
611,
802804
/**/
803805
610,
804806
/**/

0 commit comments

Comments
 (0)