From 8547b010fa4fd95e6f49a97fac822c779b4ffde6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 19 Oct 2011 11:48:35 +0200 Subject: [PATCH] Fix part 2 of bug #9771 with lines that start with a display vector. src/xdisp.c (start_display): If the character at POS is displayed via a display vector, reset IT->current.dpvec_index to zero. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ce049ebfc84..9abbe450d3d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-10-19 Eli Zaretskii + + * xdisp.c (start_display): If the character at POS is displayed + via a display vector, reset IT->current.dpvec_index to zero. + (Bug#9771, part 2) + 2011-10-18 Chong Yidong * xdisp.c (get_next_display_element): Handle U+2010 and U+2011 diff --git a/src/xdisp.c b/src/xdisp.c index 75763616f72..50ddd6b08b8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2851,6 +2851,13 @@ start_display (struct it *it, struct window *w, struct text_pos pos) it->continuation_lines_width += it->current_x; } + /* If the character at POS is displayed via a display + vector, move_it_to above stops at the final glyph of + IT->dpvec. To make the caller redisplay that character + again (a.k.a. start at POS), we need to reset the + dpvec_index to the beginning of IT->dpvec. */ + else if (it->current.dpvec_index >= 0) + it->current.dpvec_index = 0; /* We're starting a new display line, not affected by the height of the continued line, so clear the appropriate -- 2.39.2