From: Eli Zaretskii <eliz@gnu.org>
Date: Sat, 11 Oct 2014 12:21:26 +0000 (+0300)
Subject: Reset the bracket_resolved flag before advancing to next character.
X-Git-Tag: emacs-25.0.90~2635^2~679^2~50^2~19
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4eb60cd3a157ff99d380028687e07f01354c65fc;p=emacs.git

Reset the bracket_resolved flag before advancing to next character.
---

diff --git a/src/bidi.c b/src/bidi.c
index a1fe68faab4..37d7a6f4974 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2382,7 +2382,7 @@ bidi_resolve_bracket_pairs (struct bidi_it *bidi_it)
 			    & (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE))
 			   == (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE))
 		    type = ((embedding_level & 1) ? STRONG_L : STRONG_R);
-		  else if (bpa_stack[sp].flags & FLAG_OPPOSITE_INSIDE) /* N0c2 */
+		  else if (bpa_stack[sp].flags & FLAG_OPPOSITE_INSIDE) /*N0c2*/
 		    type = ((embedding_level & 1) ? STRONG_R : STRONG_L);
 
 		  /* Update and cache the closing bracket.  */
@@ -2777,6 +2777,9 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
 	  && bidi_it->charpos >= bidi_it->next_for_ws.charpos)
 	bidi_it->next_for_ws.type = UNKNOWN_BT;
 
+      /* Resete the bracket_resolved flag.  */
+      bidi_it->bracket_resolved = 0;
+
       /* This must be taken before we fill the iterator with the info
 	 about the next char.  If we scan backwards, the iterator
 	 state must be already cached, so there's no need to know the