From 01fe1722036e6cbbf428e2068a666c36d718c74e Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Sun, 31 May 2020 16:58:19 +0000 Subject: [PATCH] Avoid losing composition state in handle_stop_backwards * src/xdisp.c (handle_stop_backwards): Save composition iterator state across our forward scan. --- src/xdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index ea28395cf5..e93b0bc201 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8692,6 +8692,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos) ptrdiff_t where_we_are = (bufp ? IT_CHARPOS (*it) : IT_STRING_CHARPOS (*it)); struct display_pos save_current = it->current; struct text_pos save_position = it->position; + struct composition_it save_cmp_it = it->cmp_it; struct text_pos pos1; ptrdiff_t next_stop; @@ -8719,6 +8720,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos) it->bidi_p = true; it->current = save_current; it->position = save_position; + it->cmp_it = save_cmp_it; next_stop = it->stop_charpos; it->stop_charpos = it->prev_stop; handle_stop (it); -- 2.27.0.rc0