patch 8.0.1652: term_dumpwrite() does not output composing characters
Problem: term_dumpwrite() does not output composing characters.
Solution: Use the cell index.
diff --git a/src/terminal.c b/src/terminal.c
index 5875af6..b60799d 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3573,7 +3573,7 @@
for (i = 0; i < VTERM_MAX_CHARS_PER_CELL
&& cell.chars[i] != NUL; ++i)
{
- len = utf_char2bytes(cell.chars[0], charbuf);
+ len = utf_char2bytes(cell.chars[i], charbuf);
fwrite(charbuf, len, 1, fd);
}
}