mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-13 08:21:03 -04:00
vt: utf8: handle multi-column spacer values correctly when combining
This commit is contained in:
parent
9eb9a3d8a5
commit
6183f7f64a
1 changed files with 3 additions and 6 deletions
9
vt.c
9
vt.c
|
|
@ -540,15 +540,12 @@ action_utf8_print(struct terminal *term, wchar_t wc)
|
||||||
if (!term->grid->cursor.lcf)
|
if (!term->grid->cursor.lcf)
|
||||||
base_col--;
|
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);
|
assert(base_col >= 0 && base_col < term->cols);
|
||||||
wchar_t base = row->cells[base_col].wc;
|
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 =
|
const struct composed *composed =
|
||||||
(base >= CELL_COMB_CHARS_LO &&
|
(base >= CELL_COMB_CHARS_LO &&
|
||||||
base < (CELL_COMB_CHARS_LO + term->composed_count))
|
base < (CELL_COMB_CHARS_LO + term->composed_count))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue