aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2025-12-31 09:44:17 +0200
committerJuri Linkov2025-12-31 09:44:17 +0200
commit464e1a5a81cb19263d2d0e26b1964ee08a84ec68 (patch)
treee5ca103bf0aa2edada6cf9e997464ae1e0a4e28f
parent3ff8f30f838ae062d45da13ad2cc11bcfe53f963 (diff)
downloademacs-feature/margin-columns.tar.gz
emacs-feature/margin-columns.zip
* src/term.c (append_glyph): Fix wide character handling in margins columns.feature/margin-columns
Use 'it->pixel_width' for 'it->margin_column' and 'nglyphs'. Also fix 'glyph->padding_p' (bug#80025).
-rw-r--r--src/term.c8
1 files 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)
1585 it->glyph_row->used[area] = margin_column + 1; 1585 it->glyph_row->used[area] = margin_column + 1;
1586 1586
1587 /* Increment the margin column for the next character 1587 /* Increment the margin column for the next character
1588 in a possibly multi-char string. */ 1588 in a possibly multiple wide chars string. */
1589 it->margin_column++; 1589 it->margin_column += it->pixel_width;
1590 1590
1591 handled_column = true; 1591 handled_column = true;
1592 nglyphs = 1; 1592 nglyphs = it->pixel_width;
1593 } 1593 }
1594 1594
1595 if (!handled_column) 1595 if (!handled_column)
@@ -1633,7 +1633,7 @@ append_glyph (struct it *it)
1633 glyph->face_id = it->face_id; 1633 glyph->face_id = it->face_id;
1634 glyph->avoid_cursor_p = it->avoid_cursor_p; 1634 glyph->avoid_cursor_p = it->avoid_cursor_p;
1635 glyph->multibyte_p = it->multibyte_p; 1635 glyph->multibyte_p = it->multibyte_p;
1636 glyph->padding_p = !handled_column && i > 0; 1636 glyph->padding_p = i > 0;
1637 glyph->charpos = CHARPOS (it->position); 1637 glyph->charpos = CHARPOS (it->position);
1638 glyph->object = it->object; 1638 glyph->object = it->object;
1639 if (it->bidi_p) 1639 if (it->bidi_p)