summaryrefslogtreecommitdiff
path: root/src/bidi.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-08-05 14:09:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-08-05 14:09:09 -0700
commita855bf48d42cd7cbc9c72def3584fd354d433f97 (patch)
tree9c9c2d5329af83b6cdf9de3871e268072b96ffeb /src/bidi.c
parent8c818d8cb75f4d61cc1875311a7b6b5f0a2d8bd1 (diff)
parent9a41cd1215e60415777bb139c0669100e347375b (diff)
downloademacs-a855bf48d42cd7cbc9c72def3584fd354d433f97.tar.gz
Merge from origin/emacs-25
9a41cd1 ; Fix typo 9356fe2 Expand FIXME near definition of fboundp 219b39f kill-rectangle should mention killed-rectangle 59fa4c3 Avoid assertion violations in nhexl-mode
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bidi.c b/src/bidi.c
index 6ea84d9c0c4..5824de54ad8 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2971,15 +2971,13 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
/* N1-N2/Retaining */
|| type == WEAK_BN)
{
- if (bidi_it->next_for_neutral.type != UNKNOWN_BT)
+ if (bidi_it->next_for_neutral.type != UNKNOWN_BT
+ && (bidi_it->next_for_neutral.charpos > bidi_it->charpos
+ /* PDI defines an eos, so it's OK for it to serve as its
+ own next_for_neutral. */
+ || (bidi_it->next_for_neutral.charpos == bidi_it->charpos
+ && bidi_it->type == PDI)))
{
- /* Make sure the data for resolving neutrals we are
- about to use is valid. */
- eassert (bidi_it->next_for_neutral.charpos > bidi_it->charpos
- /* PDI defines an eos, so it's OK for it to
- serve as its own next_for_neutral. */
- || (bidi_it->next_for_neutral.charpos == bidi_it->charpos
- && bidi_it->type == PDI));
type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
bidi_it->next_for_neutral.type,
current_level);