aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2005-08-07 17:35:09 +0000
committerRichard M. Stallman2005-08-07 17:35:09 +0000
commit3ae9c96ab9b35ea93589911c350af1d353bafd20 (patch)
tree2b663606e4f49ec5732cd0654be366b01401813a /src
parentd2a2c17f0f3735238953df26f42b4d18cb04bf4d (diff)
downloademacs-3ae9c96ab9b35ea93589911c350af1d353bafd20.tar.gz
emacs-3ae9c96ab9b35ea93589911c350af1d353bafd20.zip
(set_terminal_modes): If no TS_termcap_modes string,
output newlines to scroll the old screen contents off the screen.
Diffstat (limited to 'src')
-rw-r--r--src/term.c12
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 ()
449{ 449{
450 if (FRAME_TERMCAP_P (XFRAME (selected_frame))) 450 if (FRAME_TERMCAP_P (XFRAME (selected_frame)))
451 { 451 {
452 OUTPUT_IF (TS_termcap_modes); 452 if (TS_termcap_modes)
453 OUTPUT (TS_termcap_modes);
454 else
455 {
456 /* Output enough newlines to scroll all the old screen contents
457 off the screen, so it won't be overwritten and lost. */
458 int i;
459 for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++)
460 putchar ('\n');
461 }
462
453 OUTPUT_IF (TS_cursor_visible); 463 OUTPUT_IF (TS_cursor_visible);
454 OUTPUT_IF (TS_keypad_mode); 464 OUTPUT_IF (TS_keypad_mode);
455 losecursor (); 465 losecursor ();