From 285cd429f731082e1378c7e1362b083103c8a426 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 28 Apr 2014 02:46:50 +0200 Subject: Imported Upstream version 4.2.1 --- ansi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ansi.c') 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; -- cgit v1.2.3