diff src/term.c @ 64773:aebbf7125281

(set_terminal_modes): If no TS_termcap_modes string, output newlines to scroll the old screen contents off the screen.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Aug 2005 17:35:09 +0000
parents a0d1312ede66
children 462eb3df5c58
line wrap: on
line diff
--- a/src/term.c	Sun Aug 07 15:42:42 2005 +0000
+++ b/src/term.c	Sun Aug 07 17:35:09 2005 +0000
@@ -449,7 +449,17 @@
 {
   if (FRAME_TERMCAP_P (XFRAME (selected_frame)))
     {
-      OUTPUT_IF (TS_termcap_modes);
+      if (TS_termcap_modes)
+	OUTPUT (TS_termcap_modes);
+      else
+	{
+	  /* Output enough newlines to scroll all the old screen contents
+	     off the screen, so it won't be overwritten and lost.  */
+	  int i;
+	  for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++)
+	    putchar ('\n');
+	}
+
       OUTPUT_IF (TS_cursor_visible);
       OUTPUT_IF (TS_keypad_mode);
       losecursor ();