* 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)
{
eassert (bidi_it->prev.charpos == bidi_it->charpos - 1);
prev_type = bidi_it->prev.orig_type;
{
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. */
}
}
/* Don't move at end of buffer/string. */
emacs_abort ();
bidi_it->bytepos += bidi_it->ch_len;
prev_type = bidi_it->orig_type;
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;
}
else /* EOB or end of string */
prev_type = NEUTRAL_B;
if (typ1 != STRONG_R && typ1 != STRONG_AL)
{
type = LRI;
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;
+ {
+ type = RLI;
+ bidi_it->orig_type = type;
+ }
/* FALLTHROUGH */
case RLI: /* X5a */
if (override == NEUTRAL_DIR)
/* FALLTHROUGH */
case RLI: /* X5a */
if (override == NEUTRAL_DIR)