diff options
author | Joe Wilm <joe@jwilm.com> | 2017-08-09 13:24:51 -0500 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-08-11 08:29:56 -0700 |
commit | 071c72b3cd331762756ae1771d70969a03e0c993 (patch) | |
tree | 5c328c5174e69a630ce53a1ee0496a9dcaf2cdf2 | |
parent | 6de7ee0c511f3b7f2c01822b73da04eaaaf3ecf7 (diff) | |
download | alacritty-071c72b3cd331762756ae1771d70969a03e0c993.tar.gz alacritty-071c72b3cd331762756ae1771d70969a03e0c993.zip |
Fix smcup/rmcup toggle bug
Resolves #634.
-rw-r--r-- | src/term/mod.rs | 8 |
1 files 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), |