aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index 3d7f4ada0b9..87a412666d0 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1585,10 +1585,16 @@ produce_glyphs (struct it *it)
1585 { 1585 {
1586 int absolute_x = (it->current_x 1586 int absolute_x = (it->current_x
1587 + it->continuation_lines_width); 1587 + it->continuation_lines_width);
1588 int x0 = absolute_x;
1589 /* Adjust for line numbers. */
1590 if (!NILP (Vdisplay_line_numbers))
1591 absolute_x -= it->lnum_pixel_width;
1588 int next_tab_x 1592 int next_tab_x
1589 = (((1 + absolute_x + it->tab_width - 1) 1593 = (((1 + absolute_x + it->tab_width - 1)
1590 / it->tab_width) 1594 / it->tab_width)
1591 * it->tab_width); 1595 * it->tab_width);
1596 if (!NILP (Vdisplay_line_numbers))
1597 next_tab_x += it->lnum_pixel_width;
1592 int nspaces; 1598 int nspaces;
1593 1599
1594 /* If part of the TAB has been displayed on the previous line 1600 /* If part of the TAB has been displayed on the previous line
@@ -1596,7 +1602,7 @@ produce_glyphs (struct it *it)
1596 been incremented already by the part that fitted on the 1602 been incremented already by the part that fitted on the
1597 continued line. So, we will get the right number of spaces 1603 continued line. So, we will get the right number of spaces
1598 here. */ 1604 here. */
1599 nspaces = next_tab_x - absolute_x; 1605 nspaces = next_tab_x - x0;
1600 1606
1601 if (it->glyph_row) 1607 if (it->glyph_row)
1602 { 1608 {