]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve on previous change in xdisp.c.
authorEli Zaretskii <eliz@gnu.org>
Mon, 8 Aug 2011 17:37:34 +0000 (20:37 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 8 Aug 2011 17:37:34 +0000 (20:37 +0300)
src/ChangeLog
src/xdisp.c

index 193bb73976668ec6b11ef735faaae5bd501b635f..4d493eab7b182fceac48d3290cf423a85de1d823 100644 (file)
@@ -1,7 +1,9 @@
 2011-08-08  Eli Zaretskii  <eliz@gnu.org>
 
        * 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  <cyd@stupidchicken.com>
 
index 2a46fe2dad5a6b3cd783f2281e59ab02e6570c21..1437aafef39ce30c0dcfecf4fe171eba4e64c8e4 100644 (file)
@@ -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);