aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-12-31 11:34:28 +0800
committerPo Lu2023-12-31 11:34:28 +0800
commit4ffd16b8e5e4635246155fdb23967707bcb70949 (patch)
tree5ad57156ccacc284eac1e33bc47ab6cbf94505b0
parent2bbd50a03d61bb38a9b72ba86bcd46106cfeedfe (diff)
downloademacs-4ffd16b8e5e4635246155fdb23967707bcb70949.tar.gz
emacs-4ffd16b8e5e4635246155fdb23967707bcb70949.zip
Prevent overlapping sections of glyphs from being misaligned
* src/xdisp.c (gui_fix_overlapping_area): Offset all glyphs by ROW->x.
-rw-r--r--src/xdisp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 2a979c5cb9e..7023c26c1b4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -33565,13 +33565,18 @@ notice_overwritten_cursor (struct window *w, enum glyph_row_area area,
33565 33565
33566void 33566void
33567gui_fix_overlapping_area (struct window *w, struct glyph_row *row, 33567gui_fix_overlapping_area (struct window *w, struct glyph_row *row,
33568 enum glyph_row_area area, int overlaps) 33568 enum glyph_row_area area, int overlaps)
33569{ 33569{
33570 int i, x; 33570 int i, x;
33571 33571
33572 block_input (); 33572 block_input ();
33573 33573
33574 x = 0; 33574 /* row->x might be smaller than zero when produced from an iterator
33575 under horizontal scrolling. Offset all measurements by this
33576 basic value, lest hscrolled text with overlaps be displayed with
33577 its overlapping portions misaligned. */
33578 x = row->x;
33579
33575 for (i = 0; i < row->used[area];) 33580 for (i = 0; i < row->used[area];)
33576 { 33581 {
33577 if (row->glyphs[area][i].overlaps_vertically_p) 33582 if (row->glyphs[area][i].overlaps_vertically_p)