summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-06-11 13:29:05 +0300
committerEli Zaretskii <eliz@gnu.org>2011-06-11 13:29:05 +0300
commit4b988f8b7f1824a0392a3f01c1048782ed8512f9 (patch)
tree7c2838dd54ad6739808cef9ce6b7b91ab06deb9c
parent9f4ef5002457676aefa18729cf6931e38e8e9f18 (diff)
downloademacs-4b988f8b7f1824a0392a3f01c1048782ed8512f9.tar.gz
Only commentary changes, no functionality changed.
src/xdisp.c (next_element_from_buffer): Improve commentary for when the iterator is before prev_stop.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5aef6d2f112..c37881fb304 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-11 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (next_element_from_buffer): Improve commentary for when
+ the iterator is before prev_stop.
+
2011-06-10 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
diff --git a/src/xdisp.c b/src/xdisp.c
index 8486808bb40..8be85d16fb4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6822,13 +6822,20 @@ next_element_from_buffer (struct it *it)
}
}
else if (it->bidi_p
+ /* If we are before prev_stop, we may have overstepped on
+ our way backwards a stop_pos, and if so, we need to
+ handle that stop_pos. */
+ && IT_CHARPOS (*it) < it->prev_stop
/* We can sometimes back up for reasons that have nothing
to do with bidi reordering. E.g., compositions. The
code below is only needed when we are above the base
embedding level, so test for that explicitly. */
- && !BIDI_AT_BASE_LEVEL (it->bidi_it)
- && IT_CHARPOS (*it) < it->prev_stop)
+ && !BIDI_AT_BASE_LEVEL (it->bidi_it))
{
+ /* If we lost track of base_level_stop, we have no better place
+ for handle_stop_backwards to start from than BEGV. This
+ happens, e.g., when we were reseated to the previous
+ screenful of text by vertical-motion. */
if (it->base_level_stop <= 0
|| IT_CHARPOS (*it) < it->base_level_stop)
it->base_level_stop = BEGV;