emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106372: Fix bug #10035 with assertio


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106372: Fix bug #10035 with assertion violation in row_equal_p.
Date: Mon, 14 Nov 2011 22:15:38 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106372
fixes bug(s): http://debbugs.gnu.org/10035
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-14 22:15:38 +0200
message:
  Fix bug #10035 with assertion violation in row_equal_p.
  
   src/xdisp.c (display_line): Move the call to
   highlight_trailing_whitespace before the call to
   compute_line_metrics, since the latter needs to see the final
   faces of all the glyphs to compute ROW's hash value.  Fixes
   assertion violations in row_equal_p.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-11-14 17:52:09 +0000
+++ b/src/ChangeLog     2011-11-14 20:15:38 +0000
@@ -1,3 +1,11 @@
+2011-11-14  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (display_line): Move the call to
+       highlight_trailing_whitespace before the call to
+       compute_line_metrics, since the latter needs to see the final
+       faces of all the glyphs to compute ROW's hash value.  Fixes
+       assertion violations in row_equal_p.  (Bug#10035)
+
 2011-11-14  Juanma Barranquero  <address@hidden>
 
        * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-11-14 06:27:12 +0000
+++ b/src/xdisp.c       2011-11-14 20:15:38 +0000
@@ -19382,9 +19382,18 @@
       overlay_arrow_seen = 1;
     }
 
+  /* Highlight trailing whitespace.  */
+  if (!NILP (Vshow_trailing_whitespace))
+    highlight_trailing_whitespace (it->f, it->glyph_row);
+
   /* Compute pixel dimensions of this line.  */
   compute_line_metrics (it);
 
+  /* Implementation note: No changes in the glyphs of ROW or in their
+     faces can be done past this point, because compute_line_metrics
+     computes ROW's hash value and stores it within the glyph_row
+     structure.  */
+
   /* Record whether this row ends inside an ellipsis.  */
   row->ends_in_ellipsis_p
     = (it->method == GET_FROM_DISPLAY_VECTOR
@@ -19419,10 +19428,6 @@
       && cursor_row_p (row))
     set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0);
 
-  /* Highlight trailing whitespace.  */
-  if (!NILP (Vshow_trailing_whitespace))
-    highlight_trailing_whitespace (it->f, it->glyph_row);
-
   /* Prepare for the next line.  This line starts horizontally at (X
      HPOS) = (0 0).  Vertical positions are incremented.  As a
      convenience for the caller, IT->glyph_row is set to the next


reply via email to

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