aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-10-30 18:51:53 +0200
committerEli Zaretskii2014-10-30 18:51:53 +0200
commitb6a7474272ce7de5cf0e5e444a0d9221d0493ab6 (patch)
tree043b428e1e3d9b4571f02bd084f8c85ad254714f /src
parentff73c2c3e2b99c1a759fd876464d36f6dd57a4b0 (diff)
downloademacs-b6a7474272ce7de5cf0e5e444a0d9221d0493ab6.tar.gz
emacs-b6a7474272ce7de5cf0e5e444a0d9221d0493ab6.zip
Minor fix in bidi.c:bidi_cache_reset_to.
src/bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by setting it to -1. (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative index, not an absolute one, as that's what the function expects.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/bidi.c11
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 @@
12014-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
12014-10-30 Dmitry Antipov <dmantipov@yandex.ru> 82014-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
572bidi_cache_reset_to (int n) 572bidi_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;