]> git.eshelyaron.com Git - emacs.git/commitdiff
(set_terminal_modes): If no TS_termcap_modes string,
authorRichard M. Stallman <rms@gnu.org>
Sun, 7 Aug 2005 17:35:09 +0000 (17:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 7 Aug 2005 17:35:09 +0000 (17:35 +0000)
output newlines to scroll the old screen contents off the screen.

src/term.c

index c92219f8fe7b0d8dcb32da5392bb106f27a247a3..76cf2e2c6f0210e7215fac1e8c76f003f9868eff 100644 (file)
@@ -449,7 +449,17 @@ set_terminal_modes ()
 {
   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 ();