From 071c72b3cd331762756ae1771d70969a03e0c993 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Wed, 9 Aug 2017 13:24:51 -0500 Subject: Fix smcup/rmcup toggle bug Resolves #634. --- src/term/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/term/mod.rs b/src/term/mod.rs index 6b39d939..37d444ba 100644 --- a/src/term/mod.rs +++ b/src/term/mod.rs @@ -1736,7 +1736,9 @@ impl ansi::Handler for Term { match mode { ansi::Mode::SwapScreenAndSetRestoreCursor => { self.save_cursor_position(); - self.swap_alt(); + if !self.alt { + self.swap_alt(); + } self.save_cursor_position(); }, ansi::Mode::ShowCursor => self.mode.insert(mode::SHOW_CURSOR), @@ -1763,7 +1765,9 @@ impl ansi::Handler for Term { match mode { ansi::Mode::SwapScreenAndSetRestoreCursor => { self.restore_cursor_position(); - self.swap_alt(); + if self.alt { + self.swap_alt(); + } self.restore_cursor_position(); }, ansi::Mode::ShowCursor => self.mode.remove(mode::SHOW_CURSOR), -- cgit v1.2.3-54-g00ecf