emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115549: Fix bug #16165 with memory corruption by ex


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r115549: Fix bug #16165 with memory corruption by extend_face_to_end_of_line.
Date: Mon, 16 Dec 2013 18:00:26 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115549
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16165
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Mon 2013-12-16 19:59:50 +0200
message:
  Fix bug #16165 with memory corruption by extend_face_to_end_of_line.
  
   src/xdisp.c (extend_face_to_end_of_line): Don't fill background of
   display margins on mode line, header line, and in the frame's
   tool-bar window.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-16 16:14:45 +0000
+++ b/src/ChangeLog     2013-12-16 17:59:50 +0000
@@ -1,3 +1,9 @@
+2013-12-16  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (extend_face_to_end_of_line): Don't fill background of
+       display margins on mode line, header line, and in the frame's
+       tool-bar window.  (Bug#16165)
+
 2013-12-16  Andreas Schwab  <address@hidden>
 
        * gnutls.c (Fgnutls_boot): Properly check Flistp return value.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-12-15 16:51:59 +0000
+++ b/src/xdisp.c       2013-12-16 17:59:50 +0000
@@ -18863,19 +18863,26 @@
          it->glyph_row->glyphs[TEXT_AREA][0].face_id = face->id;
          it->glyph_row->used[TEXT_AREA] = 1;
        }
-      if (WINDOW_LEFT_MARGIN_WIDTH (it->w) > 0
-         && it->glyph_row->used[LEFT_MARGIN_AREA] == 0)
-       {
-         it->glyph_row->glyphs[LEFT_MARGIN_AREA][0] = space_glyph;
-         it->glyph_row->glyphs[LEFT_MARGIN_AREA][0].face_id = face->id;
-         it->glyph_row->used[LEFT_MARGIN_AREA] = 1;
-       }
-      if (WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0
-         && it->glyph_row->used[RIGHT_MARGIN_AREA] == 0)
-       {
-         it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0] = space_glyph;
-         it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0].face_id = face->id;
-         it->glyph_row->used[RIGHT_MARGIN_AREA] = 1;
+      /* Mode line and the header line don't have margins, and
+        likewise the frame's tool-bar window, if there is any.  */
+      if (!(it->glyph_row->mode_line_p
+           || (WINDOWP (f->tool_bar_window)
+               && it->w == XWINDOW (f->tool_bar_window))))
+       {
+         if (WINDOW_LEFT_MARGIN_WIDTH (it->w) > 0
+             && it->glyph_row->used[LEFT_MARGIN_AREA] == 0)
+           {
+             it->glyph_row->glyphs[LEFT_MARGIN_AREA][0] = space_glyph;
+             it->glyph_row->glyphs[LEFT_MARGIN_AREA][0].face_id = face->id;
+             it->glyph_row->used[LEFT_MARGIN_AREA] = 1;
+           }
+         if (WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0
+             && it->glyph_row->used[RIGHT_MARGIN_AREA] == 0)
+           {
+             it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0] = space_glyph;
+             it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0].face_id = face->id;
+             it->glyph_row->used[RIGHT_MARGIN_AREA] = 1;
+           }
        }
 #ifdef HAVE_WINDOW_SYSTEM
       if (it->glyph_row->reversed_p)


reply via email to

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