diff options
| author | Kim F. Storm | 2006-06-23 11:50:36 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-06-23 11:50:36 +0000 |
| commit | 6185b3db67107126cf4b314ad26157bc97975474 (patch) | |
| tree | a9cfd8b8f7f3e2569edfada7b92e0f554dfddc16 /src | |
| parent | 8800bd5c4a1de85b6aff0c6cdf4baea040f0481d (diff) | |
| download | emacs-6185b3db67107126cf4b314ad26157bc97975474.tar.gz emacs-6185b3db67107126cf4b314ad26157bc97975474.zip | |
(handle_composition_prop): Push iterator on stack.
(set_iterator_to_next): Pop iterator at end of composition.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 |
1 files 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) | |||
| 4487 | } | 4487 | } |
| 4488 | return HANDLED_RECOMPUTE_PROPS; | 4488 | return HANDLED_RECOMPUTE_PROPS; |
| 4489 | } | 4489 | } |
| 4490 | |||
| 4491 | push_it (it); | ||
| 4490 | it->method = GET_FROM_COMPOSITION; | 4492 | it->method = GET_FROM_COMPOSITION; |
| 4491 | it->cmp_id = id; | 4493 | it->cmp_id = id; |
| 4492 | it->cmp_len = COMPOSITION_LENGTH (prop); | 4494 | it->cmp_len = COMPOSITION_LENGTH (prop); |
| @@ -5791,19 +5793,19 @@ set_iterator_to_next (it, reseat_p) | |||
| 5791 | 5793 | ||
| 5792 | case GET_FROM_COMPOSITION: | 5794 | case GET_FROM_COMPOSITION: |
| 5793 | xassert (it->cmp_id >= 0 && it->cmp_id < n_compositions); | 5795 | xassert (it->cmp_id >= 0 && it->cmp_id < n_compositions); |
| 5794 | if (STRINGP (it->string)) | 5796 | xassert (it->sp > 0); |
| 5797 | pop_it (it); | ||
| 5798 | if (it->method == GET_FROM_STRING) | ||
| 5795 | { | 5799 | { |
| 5796 | IT_STRING_BYTEPOS (*it) += it->len; | 5800 | IT_STRING_BYTEPOS (*it) += it->len; |
| 5797 | IT_STRING_CHARPOS (*it) += it->cmp_len; | 5801 | IT_STRING_CHARPOS (*it) += it->cmp_len; |
| 5798 | it->method = GET_FROM_STRING; | ||
| 5799 | it->object = it->string; | 5802 | it->object = it->string; |
| 5800 | goto consider_string_end; | 5803 | goto consider_string_end; |
| 5801 | } | 5804 | } |
| 5802 | else | 5805 | else if (it->method == GET_FROM_BUFFER) |
| 5803 | { | 5806 | { |
| 5804 | IT_BYTEPOS (*it) += it->len; | 5807 | IT_BYTEPOS (*it) += it->len; |
| 5805 | IT_CHARPOS (*it) += it->cmp_len; | 5808 | IT_CHARPOS (*it) += it->cmp_len; |
| 5806 | it->method = GET_FROM_BUFFER; | ||
| 5807 | it->object = it->w->buffer; | 5809 | it->object = it->w->buffer; |
| 5808 | } | 5810 | } |
| 5809 | break; | 5811 | break; |