diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-16 05:41:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-16 05:41:51 +0000 |
| commit | 6183f7f64a10465b429f70c713102ced2e0517bc (patch) | |
| tree | fa456461b9ad1add5a717b281d503137c9a6b0fd | |
| parent | Merge pull request 'limit font size to non-negative values' (diff) | |
vt: utf8: handle multi-column spacer values correctly when combining
| -rw-r--r-- | vt.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -540,15 +540,12 @@ action_utf8_print(struct terminal *term, wchar_t wc) if (!term->grid->cursor.lcf) base_col--; + while (row->cells[base_col].wc == CELL_MULT_COL_SPACER && base_col > 0) + base_col--; + assert(base_col >= 0 && base_col < term->cols); wchar_t base = row->cells[base_col].wc; - /* Handle double-column glyphs */ - if (base == 0 && base_col > 0) { - base_col--; - base = row->cells[base_col].wc; - } - const struct composed *composed = (base >= CELL_COMB_CHARS_LO && base < (CELL_COMB_CHARS_LO + term->composed_count)) |
