emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105423: Speed up bidi redisplay with


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105423: Speed up bidi redisplay with selective-display.
Date: Mon, 08 Aug 2011 19:57:53 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105423
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2011-08-08 19:57:53 +0300
message:
  Speed up bidi redisplay with selective-display.
  
   src/xdisp.c (forward_to_next_line_start): Allow to use the
   no-display-properties-and-no-overlays under bidi display.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-08-08 15:53:35 +0000
+++ b/src/ChangeLog     2011-08-08 16:57:53 +0000
@@ -1,3 +1,8 @@
+2011-08-08  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (forward_to_next_line_start): Allow to use the
+       no-display-properties-and-no-overlays under bidi display.
+
 2011-08-08  Chong Yidong  <address@hidden>
 
        * editfns.c (Fset_time_zone_rule): Document relationship with the

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-08-06 11:49:35 +0000
+++ b/src/xdisp.c       2011-08-08 16:57:53 +0000
@@ -5532,19 +5532,34 @@
 
       xassert (!STRINGP (it->string));
 
-      /* If we are not bidi-reordering, and there isn't any `display'
-        property in sight, and no overlays, we can just use the
-        position of the newline in buffer text.  */
-      if (!it->bidi_p
-         && (it->stop_charpos >= limit
-             || ((pos = Fnext_single_property_change (make_number (start),
-                                                      Qdisplay, Qnil,
-                                                      make_number (limit)),
-                  NILP (pos))
-                 && next_overlay_change (start) == ZV)))
+      /* If there isn't any `display' property in sight, and no
+        overlays, we can just use the position of the newline in
+        buffer text.  */
+      if (it->stop_charpos >= limit
+         || ((pos = Fnext_single_property_change (make_number (start),
+                                                  Qdisplay, Qnil,
+                                                  make_number (limit)),
+              NILP (pos))
+             && next_overlay_change (start) == ZV))
        {
-         IT_CHARPOS (*it) = limit;
-         IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit);
+         if (!it->bidi_p)
+           {
+             IT_CHARPOS (*it) = limit;
+             IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit);
+           }
+         else
+           {
+             struct bidi_it bprev;
+
+             do {
+               bprev = it->bidi_it;
+               bidi_move_to_visually_next (&it->bidi_it);
+             } while (it->bidi_it.charpos != limit);
+             IT_CHARPOS (*it) = limit;
+             IT_BYTEPOS (*it) = it->bidi_it.bytepos;
+             if (bidi_it_prev)
+               *bidi_it_prev = bprev;
+           }
          *skipped_p = newline_found_p = 1;
        }
       else


reply via email to

[Prev in Thread] Current Thread [Next in Thread]