emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117447: Avoid inflooping in redisplay caused by


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-24 r117447: Avoid inflooping in redisplay caused by hscrolled R2L lines.
Date: Sun, 17 Aug 2014 14:49:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117447
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-08-17 17:48:50 +0300
message:
  Avoid inflooping in redisplay caused by hscrolled R2L lines.
  
   src/xdisp.c (display_line): Don't assume that the call to
   reseat_at_next_visible_line_start ends up at a character
   immediately following the newline on the previous line.  Avoids
   setting the ends_at_zv_p flag on screen lines that are not at or
   beyond ZV, which causes infloop in redisplay.  For the details, see
   http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-08-17 14:34:05 +0000
+++ b/src/ChangeLog     2014-08-17 14:48:50 +0000
@@ -1,5 +1,12 @@
 2014-08-17  Eli Zaretskii  <address@hidden>
 
+       * xdisp.c (display_line): Don't assume that the call to
+       reseat_at_next_visible_line_start ends up at a character
+       immediately following the newline on the previous line.  Avoids
+       setting the ends_at_zv_p flag on screen lines that are not at or
+       beyond ZV, which causes infloop in redisplay.  For the details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
+
        * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
        coordinate for hscrolled R2L screen lines.  (Bug#18277)
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-08-01 09:39:04 +0000
+++ b/src/xdisp.c       2014-08-17 14:48:50 +0000
@@ -20583,10 +20583,15 @@
          row->truncated_on_right_p = 1;
          it->continuation_lines_width = 0;
          reseat_at_next_visible_line_start (it, 0);
-         if (IT_BYTEPOS (*it) <= BEG_BYTE)
-           row->ends_at_zv_p = true;
+         /* We insist below that IT's position be at ZV because in
+            bidi-reordered lines the character at visible line start
+            might not be the character that follows the newline in
+            the logical order.  */
+         if (IT_BYTEPOS (*it) > BEG_BYTE)
+           row->ends_at_zv_p =
+             IT_BYTEPOS (*it) >= ZV_BYTE && FETCH_BYTE (ZV_BYTE - 1) != '\n';
          else
-           row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n';
+           row->ends_at_zv_p = false;
          break;
        }
     }


reply via email to

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