diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/bidi.c | 11 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6e2e55fa570..88445f3aff4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-10-30 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by | ||
| 4 | setting it to -1. | ||
| 5 | (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative | ||
| 6 | index, not an absolute one, as that's what the function expects. | ||
| 7 | |||
| 1 | 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize | 10 | * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize |
diff --git a/src/bidi.c b/src/bidi.c index ccdcb2f4451..225acd9d655 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -572,7 +572,7 @@ static void | |||
| 572 | bidi_cache_reset_to (int n) | 572 | bidi_cache_reset_to (int n) |
| 573 | { | 573 | { |
| 574 | bidi_cache_idx = bidi_cache_start + n; | 574 | bidi_cache_idx = bidi_cache_start + n; |
| 575 | bidi_cache_last_idx = n - 1; | 575 | bidi_cache_last_idx = -1; |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | /* Reset the cache state to the empty state. We only reset the part | 578 | /* Reset the cache state to the empty state. We only reset the part |
| @@ -2629,11 +2629,10 @@ bidi_find_bracket_pairs (struct bidi_it *bidi_it) | |||
| 2629 | bidi_it->bracket_enclosed_type = embedding_type; | 2629 | bidi_it->bracket_enclosed_type = embedding_type; |
| 2630 | /* bidi_cache_last_idx is set to the index of the current | 2630 | /* bidi_cache_last_idx is set to the index of the current |
| 2631 | state, because we just called bidi_cache_find above. | 2631 | state, because we just called bidi_cache_find above. |
| 2632 | Force the cache to "forget" all the cached states | 2632 | That state describes the outermost opening bracket, the |
| 2633 | starting from the one corresponding to the outermost | 2633 | one with which we entered this function. Force the cache |
| 2634 | opening bracket, which is what the current state | 2634 | to "forget" all the cached states starting from that state. */ |
| 2635 | describes. */ | 2635 | bidi_cache_reset_to (bidi_cache_last_idx - bidi_cache_start); |
| 2636 | bidi_cache_reset_to (bidi_cache_last_idx); | ||
| 2637 | /* Set up the next_for_neutral member, to help | 2636 | /* Set up the next_for_neutral member, to help |
| 2638 | bidi_resolve_neutral. */ | 2637 | bidi_resolve_neutral. */ |
| 2639 | bidi_it->next_for_neutral.type = embedding_type; | 2638 | bidi_it->next_for_neutral.type = embedding_type; |