void
gui_fix_overlapping_area (struct window *w, struct glyph_row *row,
- enum glyph_row_area area, int overlaps)
+ enum glyph_row_area area, int overlaps)
{
int i, x;
block_input ();
- x = 0;
+ /* row->x might be smaller than zero when produced from an iterator
+ under horizontal scrolling. Offset all measurements by this
+ basic value, lest hscrolled text with overlaps be displayed with
+ its overlapping portions misaligned. */
+ x = row->x;
+
for (i = 0; i < row->used[area];)
{
if (row->glyphs[area][i].overlaps_vertically_p)