[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 1481029: Fix reordering of bidi text in an isolat
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 1481029: Fix reordering of bidi text in an isolate inside an override |
Date: |
Tue, 01 Mar 2016 16:42:15 +0000 |
branch: emacs-25
commit 14810299f24986b746bcd89032ade2eef2d15ceb
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix reordering of bidi text in an isolate inside an override
* src/bidi.c (bidi_resolve_explicit): Override the orig_type value
of FSI with either LRI or RLI, as determined by the first strong
directional character in the isolate. This prevents failure to
isolate when the FSI...PDI text is inside a directional override.
(Bug#22786)
---
src/bidi.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/bidi.c b/src/bidi.c
index 9b71454..e778705 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1919,8 +1919,6 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
{
eassert (bidi_it->prev.charpos == bidi_it->charpos - 1);
prev_type = bidi_it->prev.orig_type;
- if (prev_type == FSI)
- prev_type = bidi_it->type_after_wn;
}
}
/* Don't move at end of buffer/string. */
@@ -1935,8 +1933,6 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
emacs_abort ();
bidi_it->bytepos += bidi_it->ch_len;
prev_type = bidi_it->orig_type;
- if (prev_type == FSI)
- prev_type = bidi_it->type_after_wn;
}
else /* EOB or end of string */
prev_type = NEUTRAL_B;
@@ -2091,10 +2087,17 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
if (typ1 != STRONG_R && typ1 != STRONG_AL)
{
type = LRI;
+ /* Override orig_type, which will be needed when we come to
+ examine the next character, which is the first character
+ inside the isolate. */
+ bidi_it->orig_type = type;
goto fsi_as_lri;
}
else
- type = RLI;
+ {
+ type = RLI;
+ bidi_it->orig_type = type;
+ }
/* FALLTHROUGH */
case RLI: /* X5a */
if (override == NEUTRAL_DIR)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 1481029: Fix reordering of bidi text in an isolate inside an override,
Eli Zaretskii <=