diff options
| author | Eli Zaretskii | 2014-10-11 15:21:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-10-11 15:21:26 +0300 |
| commit | 4eb60cd3a157ff99d380028687e07f01354c65fc (patch) | |
| tree | cdd39c10a668b02d92d3878f7fda09465add8ecd /src | |
| parent | 70939d8240d403b8d126783dc0eee2452765ea42 (diff) | |
| download | emacs-4eb60cd3a157ff99d380028687e07f01354c65fc.tar.gz emacs-4eb60cd3a157ff99d380028687e07f01354c65fc.zip | |
Reset the bracket_resolved flag before advancing to next character.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bidi.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) | |||
| 2382 | & (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE)) | 2382 | & (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE)) |
| 2383 | == (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE)) | 2383 | == (FLAG_OPPOSITE_INSIDE | FLAG_OPPOSITE_OUTSIDE)) |
| 2384 | type = ((embedding_level & 1) ? STRONG_L : STRONG_R); | 2384 | type = ((embedding_level & 1) ? STRONG_L : STRONG_R); |
| 2385 | else if (bpa_stack[sp].flags & FLAG_OPPOSITE_INSIDE) /* N0c2 */ | 2385 | else if (bpa_stack[sp].flags & FLAG_OPPOSITE_INSIDE) /*N0c2*/ |
| 2386 | type = ((embedding_level & 1) ? STRONG_R : STRONG_L); | 2386 | type = ((embedding_level & 1) ? STRONG_R : STRONG_L); |
| 2387 | 2387 | ||
| 2388 | /* Update and cache the closing bracket. */ | 2388 | /* Update and cache the closing bracket. */ |
| @@ -2777,6 +2777,9 @@ bidi_level_of_next_char (struct bidi_it *bidi_it) | |||
| 2777 | && bidi_it->charpos >= bidi_it->next_for_ws.charpos) | 2777 | && bidi_it->charpos >= bidi_it->next_for_ws.charpos) |
| 2778 | bidi_it->next_for_ws.type = UNKNOWN_BT; | 2778 | bidi_it->next_for_ws.type = UNKNOWN_BT; |
| 2779 | 2779 | ||
| 2780 | /* Resete the bracket_resolved flag. */ | ||
| 2781 | bidi_it->bracket_resolved = 0; | ||
| 2782 | |||
| 2780 | /* This must be taken before we fill the iterator with the info | 2783 | /* This must be taken before we fill the iterator with the info |
| 2781 | about the next char. If we scan backwards, the iterator | 2784 | about the next char. If we scan backwards, the iterator |
| 2782 | state must be already cached, so there's no need to know the | 2785 | state must be already cached, so there's no need to know the |