]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix redisplay bugs due to uninitialized glyphs in frame glyph pool.
authorEli Zaretskii <eliz@gnu.org>
Fri, 6 Aug 2010 14:54:06 +0000 (17:54 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 6 Aug 2010 14:54:06 +0000 (17:54 +0300)
 dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
 msdos.c (IT_display_cursor): Log cursor position on termscript.
 .gdbinit (pgx): Display the avoid_cursor_p flag.

src/.gdbinit
src/ChangeLog
src/dispnew.c
src/msdos.c

index 1fd7e288736b92e8ccd0380b89842506d0e012b0..b3bb6b58267f76ae016685944702782a9342806c 100644 (file)
@@ -535,6 +535,9 @@ define pgx
   if ($g->overlaps_vertically_p)
     printf " OVL"
   end
+  if ($g->avoid_cursor_p)
+    printf " AVOID"
+  end
   if ($g->left_box_line_p)
     printf " ["
   end
index feda54defd8b020de69d1b9e4abdc612cc48357a..9ceb19ad48666681a25f0b0068cd61770a055b3b 100644 (file)
@@ -1,3 +1,11 @@
+2010-08-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (realloc_glyph_pool): Zero out newly allocated glyphs.
+
+       * msdos.c (IT_display_cursor): Log cursor position on termscript.
+
+       * .gdbinit (pgx): Display the avoid_cursor_p flag.
+
 2010-08-06  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef
index 52d50186939b00656bef7c9cd38e943fa61ab9f0..35893872c731c6f159c5412283b4a90bad941e8a 100644 (file)
@@ -1528,7 +1528,11 @@ realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim)
       int size = needed * sizeof (struct glyph);
 
       if (pool->glyphs)
-       pool->glyphs = (struct glyph *) xrealloc (pool->glyphs, size);
+       {
+         pool->glyphs = (struct glyph *) xrealloc (pool->glyphs, size);
+         memset (pool->glyphs + pool->nglyphs, 0,
+                 size - pool->nglyphs * sizeof (struct glyph));
+       }
       else
        {
          pool->glyphs = (struct glyph *) xmalloc (size);
index dda24cc868f3e2074f5fe8881a2fc1f8dd6aa9c8..fefefd9147c5900059226fcbb1c19d788dc9aa4b 100644 (file)
@@ -1593,14 +1593,16 @@ IT_display_cursor (int on)
       ScreenSetCursor (current_pos_Y, current_pos_X);
       cursor_cleared = 0;
       if (tty->termscript)
-       fprintf (tty->termscript, "\nCURSOR ON");
+       fprintf (tty->termscript, "\nCURSOR ON (%dx%d)",
+                current_pos_Y, current_pos_X);
     }
   else if (!on && !cursor_cleared)
     {
       ScreenSetCursor (-1, -1);
       cursor_cleared = 1;
       if (tty->termscript)
-       fprintf (tty->termscript, "\nCURSOR OFF");
+       fprintf (tty->termscript, "\nCURSOR OFF (%dx%d)",
+                current_pos_Y, current_pos_X);
     }
 }