aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-04-23 18:05:23 +0300
committerEli Zaretskii2010-04-23 18:05:23 +0300
commit8785b8887a35e22970b65409de0738302b91c982 (patch)
treee1b1c429af2a6fe26b23333564f31ec3f72dfc22 /src
parent809fcabaac3e5ecd5f953928483216d0d25b957e (diff)
downloademacs-8785b8887a35e22970b65409de0738302b91c982.tar.gz
emacs-8785b8887a35e22970b65409de0738302b91c982.zip
Support `display' text properties and overlays.
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/ChangeLog6
-rw-r--r--src/xdisp.c30
2 files changed, 36 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9e08f6a8977..25f5a2af42a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12010-04-23 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (pop_it): When the stack is popped after displaying
4 from a string, bidi-iterate to exit from the text portion covered
5 by the `display' property or overlay. (Bug#5988, bug#5920)
6
12010-04-23 Dan Nicolaescu <dann@ics.uci.edu> 72010-04-23 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * s/netbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure sets nocombreloc. 9 * s/netbsd.h (LD_SWITCH_SYSTEM_TEMACS): Remove, configure sets nocombreloc.
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;