summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index e68c4f6f292..86d6b75e187 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5309,7 +5309,7 @@ pop_it (it)
determine the paragraph base direction if the overlay we
just processed is at the beginning of a new
paragraph. */
- if (it->bidi_it.first_elt)
+ if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
/* prev_stop can be zero, so check against BEGV as well. */
while (it->bidi_it.charpos >= BEGV