From: Eli Zaretskii Date: Fri, 6 Aug 2010 14:54:06 +0000 (+0300) Subject: Fix redisplay bugs due to uninitialized glyphs in frame glyph pool. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~49^2~41^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb4545adef5f73617ed0ae1399a7507d12c6353e;p=emacs.git Fix redisplay bugs due to uninitialized glyphs in frame glyph pool. 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. --- diff --git a/src/.gdbinit b/src/.gdbinit index 1fd7e288736..b3bb6b58267 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index feda54defd8..9ceb19ad486 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2010-08-06 Eli Zaretskii + + * 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 * process.c: Remove HAVE_SOCKETS #ifdefs inside #ifdef diff --git a/src/dispnew.c b/src/dispnew.c index 52d50186939..35893872c73 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -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); diff --git a/src/msdos.c b/src/msdos.c index dda24cc868f..fefefd9147c 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -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); } }