emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107259: Avoid a risky corner case wi


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107259: Avoid a risky corner case with invalid face ids.
Date: Sun, 12 Feb 2012 17:46:33 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107259
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-02-12 17:46:33 +0800
message:
  Avoid a risky corner case with invalid face ids.
  
  * src/xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
  as that creates a dangerous corner case.
modified:
  src/ChangeLog
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-02-12 04:29:50 +0000
+++ b/src/ChangeLog     2012-02-12 09:46:33 +0000
@@ -1,5 +1,8 @@
 2012-02-12  Chong Yidong  <address@hidden>
 
+       * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
+       as that creates a dangerous corner case.
+
        * window.c (Fdelete_window_internal): Invalidate the mouse
        highlight (Bug#9904).
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-02-02 09:07:29 +0000
+++ b/src/xdisp.c       2012-02-12 09:46:33 +0000
@@ -2750,9 +2750,12 @@
   if (charpos >= BUF_BEG (current_buffer))
     {
       it->end_charpos = ZV;
-      it->face_id = -1;
       IT_CHARPOS (*it) = charpos;
 
+      /* We will rely on `reseat' to set this up properly, via
+        handle_face_prop.  */
+      it->face_id = it->base_face_id;
+
       /* Compute byte position if not specified.  */
       if (bytepos < charpos)
        IT_BYTEPOS (*it) = CHAR_TO_BYTE (charpos);


reply via email to

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