diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-08-07 17:35:09 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-08-07 17:35:09 +0000 |
commit | 3ae9c96ab9b35ea93589911c350af1d353bafd20 (patch) | |
tree | 2b663606e4f49ec5732cd0654be366b01401813a /src/term.c | |
parent | d2a2c17f0f3735238953df26f42b4d18cb04bf4d (diff) | |
download | emacs-3ae9c96ab9b35ea93589911c350af1d353bafd20.tar.gz |
(set_terminal_modes): If no TS_termcap_modes string,
output newlines to scroll the old screen contents off the screen.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 (); |