summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-11-24 17:04:37 +0200
committerEli Zaretskii <eliz@gnu.org>2020-11-24 17:04:37 +0200
commitf425a774c23ef683e3c052782a497ea30c0ebd10 (patch)
tree7c62a1fdb74f876f0119940c1845c5e334614e99
parent2b1cec559202d5985b7431ffce943bf4b019fb95 (diff)
downloademacs-f425a774c23ef683e3c052782a497ea30c0ebd10.tar.gz
Fix display artifacts when 'display' properties cover newlines
* src/xdisp.c (pos_visible_p): Set glyph_row of scratch iterators to NULL, to avoid producing glyphs while we figure out the layout. (Bug#44826)
-rw-r--r--src/xdisp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c9175a68a02..e65505b1b16 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1700,6 +1700,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
from a display vector, we need to consume all of
the glyphs from that display vector. */
start_display (&it2, w, top);
+ it2.glyph_row = NULL;
move_it_to (&it2, charpos - 1, -1, -1, -1, MOVE_TO_POS);
/* If we didn't get to CHARPOS - 1, there's some
replacing display property at that position, and
@@ -1823,6 +1824,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
of the display line where the display string
begins. */
start_display (&it3, w, top);
+ it3.glyph_row = NULL;
move_it_to (&it3, -1, 0, top_y, -1, MOVE_TO_X | MOVE_TO_Y);
/* If it3_moved stays false after the 'while' loop
below, that means we already were at a newline