diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-11-16 07:40:11 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-12-01 18:41:49 +0000 |
| commit | 8bd711c33badbcedd7126a51804c84fa70b17994 (patch) | |
| tree | 95744a36b2698a7ecbfd1b0e5c53f3092b1d649e | |
| parent | keymap: fix alt+return combos (diff) | |
render: allow-overflow: require a space in the next cell
When checking if we should allow a single-width character double-width
glyph to overflow into the next cell, require the next cell to either
be empty, or contain a space.
Closes #203
| -rw-r--r-- | render.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -451,12 +451,16 @@ render_cell(struct terminal *term, pixman_image_t *pix, * - the *character* width is 1 * - the *glyph* width is at least 1.5 cells * - the *glyph* width is less than 3 cells + * - *this* column isn’t the last column + * - *this* cells is followed by an empty cell, or a space */ if (term->conf->tweak.allow_overflowing_double_width_glyphs && glyph != NULL && glyph->cols == 1 && glyph->width >= term->cell_width * 15 / 10 && - glyph->width < 3 * term->cell_width) + glyph->width < 3 * term->cell_width && + col < term->cols - 1 && + (row->cells[col + 1].wc == 0 || row->cells[col + 1].wc == L' ')) { cell_cols = min(2, cols_left); } |
