GNU bug report logs - #30226
Fixing it->pixel_width / it->current_x when tabs and line numbers.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 23 Jan 2018 07:33:02 UTC

Severity: minor

Tags: wontfix

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30226 <at> debbugs.gnu.org
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.




This bug report was last modified 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.