summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2001-12-13 20:20:45 +0000
committerMichael Jennings <mej@kainx.org>2001-12-13 20:20:45 +0000
commit7701e6d1e1dd5b510b02149c97e68c71cefc23b0 (patch)
treec0d529f8d9d318a7e6d7cc3261c0b2303243169e /src/term.c
parent42bf9ce52b37c13f280c51c9762f031544522ab3 (diff)
downloadeterm-7701e6d1e1dd5b510b02149c97e68c71cefc23b0.tar.gz
Thu Dec 13 15:14:33 2001 Michael Jennings (mej)
An update to a previous patch from Paul Brannan <pbranna@clemson.edu>. SVN revision: 5768
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c
index c7ee3b7..e403823 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1531,7 +1531,11 @@ process_terminal_mode(int mode, int priv, unsigned int nargs, int arg[])
case 1047: /* Alternate screen & clear */
PrivCases(PrivMode_Screen);
scr_change_screen(state);
- scr_erase_screen(0);
+ if (state) {
+ /* Only clear the screen when switching to the
+ secondary screen. Leave the primary intact. */
+ scr_erase_screen(2);
+ }
break;
case 1048: /* Save/restore cursor pos */
PrivCases(PrivMode_Screen);
@@ -1541,6 +1545,11 @@ process_terminal_mode(int mode, int priv, unsigned int nargs, int arg[])
PrivCases(PrivMode_Screen);
scr_cursor(state ? SAVE : RESTORE);
scr_change_screen(state);
+ if (state) {
+ /* Only clear the screen when switching to the
+ secondary screen. Leave the primary intact. */
+ scr_erase_screen(2);
+ }
break;
}
break;