[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4e1661e96c4 3/4: * src/term.c (produce_glyphs): Synchronize with
From: |
Po Lu |
Subject: |
master 4e1661e96c4 3/4: * src/term.c (produce_glyphs): Synchronize with gui_produce_glyphs. |
Date: |
Thu, 1 Feb 2024 03:27:54 -0500 (EST) |
branch: master
commit 4e1661e96c4412e8bf04cd1ec8948df4a782a10c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
* src/term.c (produce_glyphs): Synchronize with gui_produce_glyphs.
---
src/term.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
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)
it->pixel_width = it->nglyphs = 0;
else if (it->char_to_display == '\t')
{
+ /* wrap-prefix strings are prepended to continuation lines, so
+ the width of tab characters inside should be computed from
+ the start of this screen line rather than as a product of the
+ total width of the physical line being wrapped. */
int absolute_x = (it->current_x
- + it->continuation_lines_width);
+ + (it->string_from_prefix_prop_p
+ /* Subtract the width of the
+ prefix from it->current_x if
+ it exists. */
+ ? 0 : (it->continuation_lines_width
+ ? (it->continuation_lines_width
+ - it->wrap_prefix_width)
+ : 0)));
int x0 = absolute_x;
/* Adjust for line numbers. */
if (!NILP (Vdisplay_line_numbers) && it->line_number_produced_p)