From 757664a4549c35d3cf5f2f4305ba1f09ce97a6da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 8 Aug 2011 20:37:34 +0300 Subject: [PATCH] Improve on previous change in xdisp.c. --- src/ChangeLog | 4 +++- src/xdisp.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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); -- 2.39.2