From 6185b3db67107126cf4b314ad26157bc97975474 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 23 Jun 2006 11:50:36 +0000 Subject: [PATCH] (handle_composition_prop): Push iterator on stack. (set_iterator_to_next): Pop iterator at end of composition. --- src/xdisp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index d70bc3d4238..0c46545a2ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4487,6 +4487,8 @@ handle_composition_prop (it) } return HANDLED_RECOMPUTE_PROPS; } + + push_it (it); it->method = GET_FROM_COMPOSITION; it->cmp_id = id; it->cmp_len = COMPOSITION_LENGTH (prop); @@ -5791,19 +5793,19 @@ set_iterator_to_next (it, reseat_p) case GET_FROM_COMPOSITION: xassert (it->cmp_id >= 0 && it->cmp_id < n_compositions); - if (STRINGP (it->string)) + xassert (it->sp > 0); + pop_it (it); + if (it->method == GET_FROM_STRING) { IT_STRING_BYTEPOS (*it) += it->len; IT_STRING_CHARPOS (*it) += it->cmp_len; - it->method = GET_FROM_STRING; it->object = it->string; goto consider_string_end; } - else + else if (it->method == GET_FROM_BUFFER) { IT_BYTEPOS (*it) += it->len; IT_CHARPOS (*it) += it->cmp_len; - it->method = GET_FROM_BUFFER; it->object = it->w->buffer; } break; -- 2.39.2