emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105865: Fix assertion failure when d


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105865: Fix assertion failure when displaying stretch glyphs under linum-mode.
Date: Wed, 21 Sep 2011 04:13:18 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105865
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Wed 2011-09-21 04:13:18 -0400
message:
  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.
modified:
  src/ChangeLog
  src/dispextern.h
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-20 17:42:16 +0000
+++ b/src/ChangeLog     2011-09-21 08:13:18 +0000
@@ -1,3 +1,11 @@
+2011-09-21  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
+       the xassert test.
+
+       * dispextern.h (struct it): Update the comment documenting what
+       can it->OBJECT be.
+
 2011-09-20  Eli Zaretskii  <address@hidden>
 
        * xdisp.c (set_cursor_from_row): If the row ends in a newline from

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2011-09-14 21:45:51 +0000
+++ b/src/dispextern.h  2011-09-21 08:13:18 +0000
@@ -2398,9 +2398,19 @@
   Lisp_Object font_height;
 
   /* Object and position where the current display element came from.
-     Object can be a Lisp string in case the current display element
-     comes from an overlay string, or it is buffer.  It may also be nil
-     during mode-line update.  Position is a position in object.  */
+     Object is normally the buffer which is being rendered, but it can
+     also be a Lisp string in case the current display element comes
+     from an overlay string or from a display string (before- or
+     after-string).  It may also be nil when a C string is being
+     rendered, e.g., during mode-line or header-line update.  It can
+     also be a cons cell of the form `(space ...)', when we produce a
+     stretch glyph from a `display' specification.  Finally, it can be
+     a zero-valued Lisp integer, but only temporarily, when we are
+     producing special glyphs for display purposes, like truncation
+     and continuation glyphs, or blanks that extend each line to the
+     edge of the window on a TTY.
+
+     Position is the current iterator position in object.  */
   Lisp_Object object;
   struct text_pos position;
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-09-20 17:42:16 +0000
+++ b/src/xdisp.c       2011-09-21 08:13:18 +0000
@@ -5459,7 +5459,8 @@
                && IT_BYTEPOS (*it) == it->bidi_it.bytepos)
               || (STRINGP (it->object)
                   && IT_STRING_CHARPOS (*it) == it->bidi_it.charpos
-                  && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos));
+                  && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos)
+              || (CONSP (it->object) && it->method == GET_FROM_STRETCH));
     }
 }
 


reply via email to

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