From: Richard M. Stallman Date: Sun, 7 Aug 2005 17:35:09 +0000 (+0000) Subject: (set_terminal_modes): If no TS_termcap_modes string, X-Git-Tag: emacs-pretest-22.0.90~7759 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3ae9c96ab9b35ea93589911c350af1d353bafd20;p=emacs.git (set_terminal_modes): If no TS_termcap_modes string, output newlines to scroll the old screen contents off the screen. --- diff --git a/src/term.c b/src/term.c index c92219f8fe7..76cf2e2c6f0 100644 --- a/src/term.c +++ b/src/term.c @@ -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 ();