aboutsummaryrefslogtreecommitdiffstats
path: root/src/bidi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bidi.c b/src/bidi.c
index 0c8a3182510..d637ee0eeb5 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -976,10 +976,11 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, struct bidi_it *bidi_it)
976 bidi_it->new_paragraph = 1; 976 bidi_it->new_paragraph = 1;
977 bidi_it->separator_limit = -1; 977 bidi_it->separator_limit = -1;
978 bidi_it->type = NEUTRAL_B; 978 bidi_it->type = NEUTRAL_B;
979 bidi_it->type_after_w1 = UNKNOWN_BT; 979 bidi_it->type_after_w1 = NEUTRAL_B;
980 bidi_it->orig_type = UNKNOWN_BT; 980 bidi_it->orig_type = NEUTRAL_B;
981 bidi_it->prev_was_pdf = 0; 981 bidi_it->prev_was_pdf = 0;
982 bidi_it->prev.type = bidi_it->prev.type_after_w1 = UNKNOWN_BT; 982 bidi_it->prev.type = bidi_it->prev.type_after_w1 =
983 bidi_it->prev.orig_type = UNKNOWN_BT;
983 bidi_it->last_strong.type = bidi_it->last_strong.type_after_w1 = 984 bidi_it->last_strong.type = bidi_it->last_strong.type_after_w1 =
984 bidi_it->last_strong.orig_type = UNKNOWN_BT; 985 bidi_it->last_strong.orig_type = UNKNOWN_BT;
985 bidi_it->next_for_neutral.charpos = -1; 986 bidi_it->next_for_neutral.charpos = -1;
@@ -1353,7 +1354,9 @@ bidi_resolve_weak (struct bidi_it *bidi_it)
1353 current level run, and thus not relevant to this NSM. 1354 current level run, and thus not relevant to this NSM.
1354 This is why NSM gets the type_after_w1 of the previous 1355 This is why NSM gets the type_after_w1 of the previous
1355 character. */ 1356 character. */
1356 if (bidi_it->prev.type != UNKNOWN_BT) 1357 if (bidi_it->prev.type_after_w1 != UNKNOWN_BT
1358 /* if type_after_w1 is NEUTRAL_B, this NSM is at sor */
1359 && bidi_it->prev.type_after_w1 != NEUTRAL_B)
1357 type = bidi_it->prev.type_after_w1; 1360 type = bidi_it->prev.type_after_w1;
1358 else if (bidi_it->sor == R2L) 1361 else if (bidi_it->sor == R2L)
1359 type = STRONG_R; 1362 type = STRONG_R;