aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-04-23 18:09:11 +0300
committerEli Zaretskii2010-04-23 18:09:11 +0300
commitf1bbc65578cd055f4107f0117e6c317b45bc5b33 (patch)
tree7627d10e245ec9fa6bd0a86c06f36f77faca4030 /src
parenta5bee597fb5c417c6f4288d0c2b96448e9b9ac7f (diff)
parent8785b8887a35e22970b65409de0738302b91c982 (diff)
downloademacs-f1bbc65578cd055f4107f0117e6c317b45bc5b33.tar.gz
emacs-f1bbc65578cd055f4107f0117e6c317b45bc5b33.zip
Support `display' text properties and overlay strings in bidi buffers.
xdisp.c (pop_it): When the stack is popped after displaying from a string, bidi-iterate to exit from the text portion covered by the `display' property or overlay. (Bug#5988, bug#5920)
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c30
2 files changed, 38 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index be510c69f1a..966fc74744d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-04-23 Eli Zaretskii <eliz@gnu.org>
2
3 Support `display' text properties and overlay strings in bidi
4 buffers.
5 * xdisp.c (pop_it): When the stack is popped after displaying
6 from a string, bidi-iterate to exit from the text portion covered
7 by the `display' property or overlay. (Bug#5988, bug#5920)
8
12010-04-23 Dan Nicolaescu <dann@ics.uci.edu> 92010-04-23 Dan Nicolaescu <dann@ics.uci.edu>
2 10
3 * m/macppc.h (LD_SWITCH_SYSTEM_TEMACS): Remove #undef. 11 * m/macppc.h (LD_SWITCH_SYSTEM_TEMACS): Remove #undef.
diff --git a/src/xdisp.c b/src/xdisp.c
index a0f97acdcb1..e68c4f6f292 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5299,6 +5299,36 @@ pop_it (it)
5299 break; 5299 break;
5300 case GET_FROM_BUFFER: 5300 case GET_FROM_BUFFER:
5301 it->object = it->w->buffer; 5301 it->object = it->w->buffer;
5302 if (it->bidi_p)
5303 {
5304 /* Bidi-iterate until we get out of the portion of text, if
5305 any, covered by a `display' text property or an overlay
5306 with `display' property. (We cannot just jump there,
5307 because the internal coherency of the bidi iterator state
5308 can not be preserved across such jumps.) We also must
5309 determine the paragraph base direction if the overlay we
5310 just processed is at the beginning of a new
5311 paragraph. */
5312 if (it->bidi_it.first_elt)
5313 bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it);
5314 /* prev_stop can be zero, so check against BEGV as well. */
5315 while (it->bidi_it.charpos >= BEGV
5316 && it->prev_stop <= it->bidi_it.charpos
5317 && it->bidi_it.charpos < CHARPOS (it->position))
5318 bidi_get_next_char_visually (&it->bidi_it);
5319 /* Record the stop_pos we just crossed, for when we cross it
5320 back, maybe. */
5321 if (it->bidi_it.charpos > CHARPOS (it->position))
5322 it->prev_stop = CHARPOS (it->position);
5323 /* If we ended up not where pop_it put us, resync IT's
5324 positional members with the bidi iterator. */
5325 if (it->bidi_it.charpos != CHARPOS (it->position))
5326 {
5327 SET_TEXT_POS (it->position,
5328 it->bidi_it.charpos, it->bidi_it.bytepos);
5329 it->current.pos = it->position;
5330 }
5331 }
5302 break; 5332 break;
5303 case GET_FROM_STRING: 5333 case GET_FROM_STRING:
5304 it->object = it->string; 5334 it->object = it->string;