From: Eli Zaretskii Date: Mon, 8 Aug 2011 17:37:34 +0000 (+0300) Subject: Improve on previous change in xdisp.c. X-Git-Tag: emacs-pretest-24.0.90~104^2~124^2~62^2~17 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=757664a4549c35d3cf5f2f4305ba1f09ce97a6da;p=emacs.git Improve on previous change in xdisp.c. --- diff --git a/src/ChangeLog b/src/ChangeLog index 193bb739766..4d493eab7b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,9 @@ 2011-08-08 Eli Zaretskii * xdisp.c (forward_to_next_line_start): Allow to use the - no-display-properties-and-no-overlays under bidi display. + no-display-properties-and-no-overlays under bidi display. Set + disp_pos in the bidi iterator to avoid searches for display + properties and overlays. 2011-08-08 Chong Yidong diff --git a/src/xdisp.c b/src/xdisp.c index 2a46fe2dad5..1437aafef39 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5551,6 +5551,14 @@ forward_to_next_line_start (struct it *it, int *skipped_p, { struct bidi_it bprev; + /* Help bidi.c avoid expensive searches for display + properties and overlays, by telling it that there are + none up to `limit'. */ + if (it->bidi_it.disp_pos < limit) + { + it->bidi_it.disp_pos = limit; + it->bidi_it.disp_prop_p = 0; + } do { bprev = it->bidi_it; bidi_move_to_visually_next (&it->bidi_it);