# HG changeset patch # User Eli Zaretskii # Date 1281107121 -10800 # Node ID f0037b96cd03a0b6ced0ab39ea34c18c346a4d41 # Parent 6387fbfcb44de0394c0acfa80e9ecc6db53f241e# Parent 85236524c2a3620846f2310f7d1f6db4e65cfc2e Fix redisplay bugs due to uninitialized glyphs. Add diagnostics tools. 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 -r 6387fbfcb44d -r f0037b96cd03 src/.gdbinit --- a/src/.gdbinit Fri Aug 06 16:34:23 2010 +0200 +++ b/src/.gdbinit Fri Aug 06 18:05:21 2010 +0300 @@ -535,6 +535,9 @@ 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 -r 6387fbfcb44d -r f0037b96cd03 src/ChangeLog --- a/src/ChangeLog Fri Aug 06 16:34:23 2010 +0200 +++ b/src/ChangeLog Fri Aug 06 18:05:21 2010 +0300 @@ -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 Juanma Barranquero * makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies. diff -r 6387fbfcb44d -r f0037b96cd03 src/dispnew.c --- a/src/dispnew.c Fri Aug 06 16:34:23 2010 +0200 +++ b/src/dispnew.c Fri Aug 06 18:05:21 2010 +0300 @@ -1528,7 +1528,11 @@ 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 -r 6387fbfcb44d -r f0037b96cd03 src/msdos.c --- a/src/msdos.c Fri Aug 06 16:34:23 2010 +0200 +++ b/src/msdos.c Fri Aug 06 18:05:21 2010 +0300 @@ -1593,14 +1593,16 @@ 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); } }