summaryrefslogtreecommitdiff
path: root/ansi.c
diff options
context:
space:
mode:
Diffstat (limited to 'ansi.c')
-rw-r--r--ansi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ansi.c b/ansi.c
index 04c9012..e76eef4 100644
--- a/ansi.c
+++ b/ansi.c
@@ -1436,14 +1436,17 @@ int c, intermediate;
{
if (i)
{
- if (!curr->w_alt.on)
+ if (!curr->w_alt.on) {
SaveCursor(&curr->w_alt.cursor);
- EnterAltScreen(curr);
+ EnterAltScreen(curr);
+ }
}
else
{
- LeaveAltScreen(curr);
- RestoreCursor(&curr->w_alt.cursor);
+ if (curr->w_alt.on) {
+ LeaveAltScreen(curr);
+ RestoreCursor(&curr->w_alt.cursor);
+ }
}
if (a1 == 47 && !i)
curr->w_saved.on = 0;