summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2010-08-06 18:05:21 +0300
committerEli Zaretskii <eliz@gnu.org>2010-08-06 18:05:21 +0300
commit47223c041363ff7b940a3e0ca37b64ec4fe1be92 (patch)
treed81d7f8b6b0fa789f181752fd58fccedc40bb7f9
parentd00fa9b65e158e77c05cd0d64c2e3e4107de2080 (diff)
parentcb4545adef5f73617ed0ae1399a7507d12c6353e (diff)
downloademacs-47223c041363ff7b940a3e0ca37b64ec4fe1be92.tar.gz
emacs-47223c041363ff7b940a3e0ca37b64ec4fe1be92.tar.bz2
emacs-47223c041363ff7b940a3e0ca37b64ec4fe1be92.zip
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.
-rw-r--r--src/.gdbinit3
-rw-r--r--src/ChangeLog8
-rw-r--r--src/dispnew.c6
-rw-r--r--src/msdos.c6
4 files changed, 20 insertions, 3 deletions
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 d4df4268578..48968c0a97f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in ($(BLD)/xdisp.$(O)): Update dependencies.
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);
}
}