diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:50:55 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:50:55 +0000 |
| commit | 80c2d9d89df11c5830de900f98b5d9f3f406a1c1 (patch) | |
| tree | a27132ebbd0940872c16afd3f48f4ee791820a0a /extract.c | |
| parent | Merge branch 'sixel-heap-user-after-free-after-blending' (diff) | |
| parent | client: add +/-graphemes to version output (diff) | |
Merge branch 'harfbuzz'
Diffstat (limited to 'extract.c')
| -rw-r--r-- | extract.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -223,18 +223,16 @@ extract_one(const struct terminal *term, const struct row *row, ctx->newline_count = 0; ctx->empty_count = 0; - if (cell->wc >= CELL_COMB_CHARS_LO && - cell->wc < (CELL_COMB_CHARS_LO + term->composed_count)) + if (cell->wc >= CELL_COMB_CHARS_LO && cell->wc <= CELL_COMB_CHARS_HI) { - const struct composed *composed - = &term->composed[cell->wc - CELL_COMB_CHARS_LO]; + const struct composed *composed = composed_lookup( + term->composed, cell->wc - CELL_COMB_CHARS_LO); - if (!ensure_size(ctx, 1 + composed->count)) + if (!ensure_size(ctx, composed->count)) goto err; - ctx->buf[ctx->idx++] = composed->base; for (size_t i = 0; i < composed->count; i++) - ctx->buf[ctx->idx++] = composed->combining[i]; + ctx->buf[ctx->idx++] = composed->chars[i]; } else { |
