From e170f85ce3699be37991f08677587a05eb0f4dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandar=20Popadi=C4=87?= Date: Tue, 10 Dec 2013 21:32:52 +0100 Subject: [PATCH] Do not switch buffer if buffer already switched. Summary: Mutt does this. It sets the alternate buffer, it disables it, it disables it again and enables it back. Test Plan: Run mutt, quit mutt, run mutt, quit mutt. You should see the residual background from mutt. Reviewers: billiob Differential Revision: https://phab.enlightenment.org/D371 --- src/bin/termptyesc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index 6b4c4ec4..a81715fb 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -840,9 +840,9 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) // into the screen2 save (so save is // clear) _termpty_clear_all(ty); - // swap screen content now - termpty_screen_swap(ty); + if (mode != ty->altbuf) + termpty_screen_swap(ty); break; case 1048: if (mode)