]> git.eshelyaron.com Git - emacs.git/commitdiff
Reset the bracket_resolved flag before advancing to next character.
authorEli Zaretskii <eliz@gnu.org>
Sat, 11 Oct 2014 12:21:26 +0000 (15:21 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Oct 2014 12:21:26 +0000 (15:21 +0300)
src/bidi.c

index a1fe68faab4ec6969e281461553feeb7f1ad7ddc..37d7a6f4974424c726707d7d159b0840300b0c52 100644 (file)
@@ -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