aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-11-14 22:15:38 +0200
committerEli Zaretskii2011-11-14 22:15:38 +0200
commit322ad6ec0e773dffefad12df88c98041ca35b427 (patch)
tree54cc69cb9229d033cedc1bef40b728d20fbe849c /src
parentf067b8eccaa2990b157f2a97a1122211ae751156 (diff)
downloademacs-322ad6ec0e773dffefad12df88c98041ca35b427.tar.gz
emacs-322ad6ec0e773dffefad12df88c98041ca35b427.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c13
2 files changed, 17 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3e2ebaa0efc..3c93caec5d8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-11-14 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (display_line): Move the call to
4 highlight_trailing_whitespace before the call to
5 compute_line_metrics, since the latter needs to see the final
6 faces of all the glyphs to compute ROW's hash value. Fixes
7 assertion violations in row_equal_p. (Bug#10035)
8
12011-11-14 Juanma Barranquero <lekktu@gmail.com> 92011-11-14 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0, 11 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
diff --git a/src/xdisp.c b/src/xdisp.c
index efe7a6c9d00..6129c5e566f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19382,9 +19382,18 @@ display_line (struct it *it)
19382 overlay_arrow_seen = 1; 19382 overlay_arrow_seen = 1;
19383 } 19383 }
19384 19384
19385 /* Highlight trailing whitespace. */
19386 if (!NILP (Vshow_trailing_whitespace))
19387 highlight_trailing_whitespace (it->f, it->glyph_row);
19388
19385 /* Compute pixel dimensions of this line. */ 19389 /* Compute pixel dimensions of this line. */
19386 compute_line_metrics (it); 19390 compute_line_metrics (it);
19387 19391
19392 /* Implementation note: No changes in the glyphs of ROW or in their
19393 faces can be done past this point, because compute_line_metrics
19394 computes ROW's hash value and stores it within the glyph_row
19395 structure. */
19396
19388 /* Record whether this row ends inside an ellipsis. */ 19397 /* Record whether this row ends inside an ellipsis. */
19389 row->ends_in_ellipsis_p 19398 row->ends_in_ellipsis_p
19390 = (it->method == GET_FROM_DISPLAY_VECTOR 19399 = (it->method == GET_FROM_DISPLAY_VECTOR
@@ -19419,10 +19428,6 @@ display_line (struct it *it)
19419 && cursor_row_p (row)) 19428 && cursor_row_p (row))
19420 set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); 19429 set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0);
19421 19430
19422 /* Highlight trailing whitespace. */
19423 if (!NILP (Vshow_trailing_whitespace))
19424 highlight_trailing_whitespace (it->f, it->glyph_row);
19425
19426 /* Prepare for the next line. This line starts horizontally at (X 19431 /* Prepare for the next line. This line starts horizontally at (X
19427 HPOS) = (0 0). Vertical positions are incremented. As a 19432 HPOS) = (0 0). Vertical positions are incremented. As a
19428 convenience for the caller, IT->glyph_row is set to the next 19433 convenience for the caller, IT->glyph_row is set to the next