[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30226: Fixing it->pixel_width / it->current_x when tabs and line num
From: |
Keith David Bershatsky |
Subject: |
bug#30226: Fixing it->pixel_width / it->current_x when tabs and line numbers. |
Date: |
Sun, 18 Feb 2018 18:17:26 -0800 |
A major break-through in the tracing of bug 30226 .... it->current_x differs
between the real thing (when display_line calls PRODUCE_GLYPHS), versus the
simulation (when move_it_in_display_line_to calls PRODUCE_GLYPHS), _because_
maybe_produce_line_number advances it->current_x in the former but _not_ the
latter.
In the revised fact pattern described in Message #26 of this thread (i.e., TAB
TAB Hello-world, and w->hscroll >= 2):
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30226#26
it->current_x stops at 7 when w->hscroll == 2.
In the simulation (move_it_in_display_line_to that does _not_ produce glyphs),
it is impossible to reach an X of 35 because that would be in the middle of the
STRETCH. maybe_produce_line_number does _not_ advance it->current_x in the
simulation.
In the real thing (display_line actually produces glyphs),
maybe_produce_line_number advances it->current_x from 7 to 35.
SOLUTION (suggested): Revise move_it_in_display_line_to advance X by
simulating a call to maybe_produce_line_number and permitting that function to
advance X.