summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2001-12-14 20:22:27 +0000
committerMichael Jennings <mej@kainx.org>2001-12-14 20:22:27 +0000
commit36b11400075401c8eb723f413348e2280d9b5c14 (patch)
treef30b18320dfb64fd10e95ff7ea751f2459b96ecb /src/term.c
parent7701e6d1e1dd5b510b02149c97e68c71cefc23b0 (diff)
downloadeterm-36b11400075401c8eb723f413348e2280d9b5c14.tar.gz
Fri Dec 14 15:17:14 2001 Michael Jennings (mej)
termcap fix from Fredrik Svensson <fred@ludd.luth.se> and another mod to Paul's patch. SVN revision: 5769
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/term.c b/src/term.c
index e403823..c2b1f7c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1530,12 +1530,12 @@ process_terminal_mode(int mode, int priv, unsigned int nargs, int arg[])
case 1047: /* Alternate screen & clear */
PrivCases(PrivMode_Screen);
- scr_change_screen(state);
- if (state) {
- /* Only clear the screen when switching to the
- secondary screen. Leave the primary intact. */
+ if (!state) {
+ /* Only clear the screen before switching from
+ secondary to primary. */
scr_erase_screen(2);
}
+ scr_change_screen(state);
break;
case 1048: /* Save/restore cursor pos */
PrivCases(PrivMode_Screen);
@@ -1543,13 +1543,13 @@ process_terminal_mode(int mode, int priv, unsigned int nargs, int arg[])
break;
case 1049: /* Alternate screen & cursor */
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_cursor(state ? SAVE : RESTORE);
+ if (!state) {
+ /* Only clear the screen before switching from
+ secondary to primary. */
scr_erase_screen(2);
}
+ scr_change_screen(state);
break;
}
break;