From 464e1a5a81cb19263d2d0e26b1964ee08a84ec68 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 Dec 2025 09:44:17 +0200 Subject: [PATCH] * src/term.c (append_glyph): Fix wide character handling in margins columns. Use 'it->pixel_width' for 'it->margin_column' and 'nglyphs'. Also fix 'glyph->padding_p' (bug#80025). --- src/term.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/term.c b/src/term.c index cf4d5ab8ec2..b4642e76c1e 100644 --- a/src/term.c +++ b/src/term.c @@ -1585,11 +1585,11 @@ append_glyph (struct it *it) it->glyph_row->used[area] = margin_column + 1; /* Increment the margin column for the next character - in a possibly multi-char string. */ - it->margin_column++; + in a possibly multiple wide chars string. */ + it->margin_column += it->pixel_width; handled_column = true; - nglyphs = 1; + nglyphs = it->pixel_width; } if (!handled_column) @@ -1633,7 +1633,7 @@ append_glyph (struct it *it) glyph->face_id = it->face_id; glyph->avoid_cursor_p = it->avoid_cursor_p; glyph->multibyte_p = it->multibyte_p; - glyph->padding_p = !handled_column && i > 0; + glyph->padding_p = i > 0; glyph->charpos = CHARPOS (it->position); glyph->object = it->object; if (it->bidi_p)