emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4ffd16b8e5e 2/2: Prevent overlapping sections of glyphs from bein


From: Po Lu
Subject: master 4ffd16b8e5e 2/2: Prevent overlapping sections of glyphs from being misaligned
Date: Sat, 30 Dec 2023 22:35:26 -0500 (EST)

branch: master
commit 4ffd16b8e5e4635246155fdb23967707bcb70949
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Prevent overlapping sections of glyphs from being misaligned
    
    * src/xdisp.c (gui_fix_overlapping_area): Offset all glyphs by
    ROW->x.
---
 src/xdisp.c | 9 +++++++--
 1 file 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,
 
 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]