aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2024-02-01 16:18:53 +0800
committerPo Lu2024-02-01 16:18:53 +0800
commit4e1661e96c4412e8bf04cd1ec8948df4a782a10c (patch)
tree250b4dad8aebaff6d900cc093487c4d3d3b0cc0e
parent881a1ade30d2efacf9fcbd136b8fea722760f36e (diff)
downloademacs-4e1661e96c4412e8bf04cd1ec8948df4a782a10c.tar.gz
emacs-4e1661e96c4412e8bf04cd1ec8948df4a782a10c.zip
* src/term.c (produce_glyphs): Synchronize with gui_produce_glyphs.
-rw-r--r--src/term.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index b3793088fac..3fa244be824 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1631,8 +1631,19 @@ produce_glyphs (struct it *it)
1631 it->pixel_width = it->nglyphs = 0; 1631 it->pixel_width = it->nglyphs = 0;
1632 else if (it->char_to_display == '\t') 1632 else if (it->char_to_display == '\t')
1633 { 1633 {
1634 /* wrap-prefix strings are prepended to continuation lines, so
1635 the width of tab characters inside should be computed from
1636 the start of this screen line rather than as a product of the
1637 total width of the physical line being wrapped. */
1634 int absolute_x = (it->current_x 1638 int absolute_x = (it->current_x
1635 + it->continuation_lines_width); 1639 + (it->string_from_prefix_prop_p
1640 /* Subtract the width of the
1641 prefix from it->current_x if
1642 it exists. */
1643 ? 0 : (it->continuation_lines_width
1644 ? (it->continuation_lines_width
1645 - it->wrap_prefix_width)
1646 : 0)));
1636 int x0 = absolute_x; 1647 int x0 = absolute_x;
1637 /* Adjust for line numbers. */ 1648 /* Adjust for line numbers. */
1638 if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p) 1649 if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p)