aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-19 18:24:37 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-11-19 18:24:37 +0000
commit587fce68fad16e6da597df49c59b7d0cff959763 (patch)
tree541fb684cdbd40f1ff8b72665bfe7567f1c43aac /render.c
parentkeymap: fix alt+return combos (diff)
parentrender: allow-overflow: require a space in the next cell (diff)
Merge branch 'require-space-to-overflow-double-width-glyph'
Diffstat (limited to 'render.c')
-rw-r--r--render.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render.c b/render.c
index 96905c0c..12601ac2 100644
--- a/render.c
+++ b/render.c
@@ -462,12 +462,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);
}