# HG changeset patch # User Richard M. Stallman # Date 1123436109 0 # Node ID aebbf712528145723a2030c03c8d5b948aaa74d4 # Parent 060177e931f852473a3875290a4fc919ccd1084b (set_terminal_modes): If no TS_termcap_modes string, output newlines to scroll the old screen contents off the screen. diff -r 060177e931f8 -r aebbf7125281 src/term.c --- 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 ();