aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-09-21 04:13:18 -0400
committerEli Zaretskii2011-09-21 04:13:18 -0400
commit3341db6299a2bb63a641210d72f73e93e2d1542e (patch)
tree0c10f907b173a58f0616c6413e11de9978224924
parentb523dc2054c5b53080082122ed4f639b59632bad (diff)
downloademacs-3341db6299a2bb63a641210d72f73e93e2d1542e.tar.gz
emacs-3341db6299a2bb63a641210d72f73e93e2d1542e.zip
Fix assertion failure when displaying stretch glyphs under linum-mode.
src/xdisp.c (pop_it): Allow it->object that is a cons cell to pass the xassert test. src/dispextern.h (struct it): Update the comment documenting what can it->OBJECT be.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/dispextern.h16
-rw-r--r--src/xdisp.c3
3 files changed, 23 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 17b53216e83..dff41f1dbbf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-09-21 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
4 the xassert test.
5
6 * dispextern.h (struct it): Update the comment documenting what
7 can it->OBJECT be.
8
12011-09-20 Eli Zaretskii <eliz@gnu.org> 92011-09-20 Eli Zaretskii <eliz@gnu.org>
2 10
3 * xdisp.c (set_cursor_from_row): If the row ends in a newline from 11 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
diff --git a/src/dispextern.h b/src/dispextern.h
index 65284121588..3c157371ef3 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2398,9 +2398,19 @@ struct it
2398 Lisp_Object font_height; 2398 Lisp_Object font_height;
2399 2399
2400 /* Object and position where the current display element came from. 2400 /* Object and position where the current display element came from.
2401 Object can be a Lisp string in case the current display element 2401 Object is normally the buffer which is being rendered, but it can
2402 comes from an overlay string, or it is buffer. It may also be nil 2402 also be a Lisp string in case the current display element comes
2403 during mode-line update. Position is a position in object. */ 2403 from an overlay string or from a display string (before- or
2404 after-string). It may also be nil when a C string is being
2405 rendered, e.g., during mode-line or header-line update. It can
2406 also be a cons cell of the form `(space ...)', when we produce a
2407 stretch glyph from a `display' specification. Finally, it can be
2408 a zero-valued Lisp integer, but only temporarily, when we are
2409 producing special glyphs for display purposes, like truncation
2410 and continuation glyphs, or blanks that extend each line to the
2411 edge of the window on a TTY.
2412
2413 Position is the current iterator position in object. */
2404 Lisp_Object object; 2414 Lisp_Object object;
2405 struct text_pos position; 2415 struct text_pos position;
2406 2416
diff --git a/src/xdisp.c b/src/xdisp.c
index 3505d18d502..0d870671c69 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5459,7 +5459,8 @@ pop_it (struct it *it)
5459 && IT_BYTEPOS (*it) == it->bidi_it.bytepos) 5459 && IT_BYTEPOS (*it) == it->bidi_it.bytepos)
5460 || (STRINGP (it->object) 5460 || (STRINGP (it->object)
5461 && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos 5461 && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos
5462 && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos)); 5462 && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos)
5463 || (CONSP (it->object) && it->method == GET_FROM_STRETCH));
5463 } 5464 }
5464} 5465}
5465 5466