aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-01 09:55:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-01 09:55:22 +0000
commit40bf01a8e69912397fa8ed9b9c0662bdce0e84f9 (patch)
tree809ca496132fb8136ca60b2ca8422f0628f0bed8
parentvt: utf8: track combining characters that we failed to compose (diff)
grid: reflow: copy combining characters
-rw-r--r--grid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/grid.c b/grid.c
index 9da36934..2a6b1073 100644
--- a/grid.c
+++ b/grid.c
@@ -208,6 +208,15 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
new_row->cells[new_col_idx] = *old_cell;
new_row->cells[new_col_idx].attrs.clean = 1;
+ struct combining_chars *old_comb_chars
+ = &old_row->comb_chars[c - empty_count + i];
+ struct combining_chars *new_comb_chars
+ = &new_row->comb_chars[new_col_idx];
+
+ new_comb_chars->count = old_comb_chars->count;
+ for (size_t j = 0; j < ALEN(new_comb_chars->chars); j++)
+ new_comb_chars->chars[j] = old_comb_chars->chars[j];
+
/* Translate tracking point(s) */
if (is_tracking_point && i >= empty_count) {
tll_foreach(tracking_points, it) {