From: Karl Heuer Date: Mon, 1 Jun 1998 03:12:04 +0000 (+0000) Subject: (Fredraw_frame): Don't erase frame or its glyph records X-Git-Tag: emacs-20.3~768 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d4279ab93817ed9b3e6cbb169b201d900ca2f4a;p=emacs.git (Fredraw_frame): Don't erase frame or its glyph records if it hasn't got any. --- diff --git a/src/dispnew.c b/src/dispnew.c index 609d0b5bf8d..a468e6ea55c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -178,13 +178,22 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, CHECK_LIVE_FRAME (frame, 0); f = XFRAME (frame); - update_begin (f); - if (FRAME_MSDOS_P (f)) - set_terminal_modes (); - clear_frame (); - clear_frame_records (f); - update_end (f); - fflush (stdout); + + /* Erase the frame and its glyph records--if it has any records. + It may have none, in the case of the terminal frame + that initially exists but is never used + when Emacs is using a window system. */ + if (FRAME_CURRENT_GLYPHS (f) != 0) + { + update_begin (f); + if (FRAME_MSDOS_P (f)) + set_terminal_modes (); + clear_frame (); + clear_frame_records (f); + update_end (f); + fflush (stdout); + } + windows_or_buffers_changed++; /* Mark all windows as INaccurate, so that every window will have its redisplay done. */