]> git.eshelyaron.com Git - emacs.git/commit
Fix display of TABs in hscrolled windows with line numbers
authorEli Zaretskii <eliz@gnu.org>
Wed, 7 Mar 2018 18:40:44 +0000 (20:40 +0200)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:14:01 +0000 (14:14 +0800)
commit317b4d2ce097d47c3e0a0556a35fba9b0cd72a2b
treef139edc8fd033cce8e91923a1b656972af22f21c
parentc8fbb060b156955f3a937a4ae3d3af7b13409534
Fix display of TABs in hscrolled windows with line numbers

* src/dispextern.h (struct it): New members tab_offset and
line_number_produced_p.
* src/xdisp.c (display_line): Don't set row->x to a negative value
if line numbers are being displayed.  (Bug#30582)
Reset the line_number_produced_p flag before laying out the glyph
row.
(x_produce_glyphs): Use the line_number_produced_p flag to decide
whether to offset the X coordinate due to line-number display.
Use the tab_offset member to restore the original TAB width for
alignment purposes.
(move_it_in_display_line_to): Don't produce line numbers when moving
in hscrolled window to the left of first_visible_x.
(maybe_produce_line_number): Set the line_number_produced_p flag.
(Bug#30584)
* src/term.c (produce_glyphs): Correct TAB width only when
line_number_produced_p flag is set.
src/dispextern.h
src/term.c
src/xdisp.c