summaryrefslogtreecommitdiff
path: root/ansi.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2014-04-28 02:46:50 +0200
committerAxel Beckert <abe@deuxchevaux.org>2014-04-28 02:46:50 +0200
commit285cd429f731082e1378c7e1362b083103c8a426 (patch)
tree90ce9c284c2812055530b6577591d725e125f75b /ansi.c
parentc3927cc39106d6b7cd746109784b6e8af203ec6b (diff)
downloadscreen-285cd429f731082e1378c7e1362b083103c8a426.tar.gz
Imported Upstream version 4.2.1upstream/4.2.1upstream
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;