From 629a12a3a0e0cd021a0d430515b2d4e849166eb8 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 10 Feb 2018 09:50:33 -0800 Subject: [PATCH] address a minor todo re: alt screen --- term/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/term/src/lib.rs b/term/src/lib.rs index 8a754a366..25d66acea 100644 --- a/term/src/lib.rs +++ b/term/src/lib.rs @@ -1455,8 +1455,6 @@ impl TerminalState { /// Adjust the scroll position of the viewport by delta. /// Dirties the lines that are now in view. pub fn scroll_viewport(&mut self, delta: VisibleRowIndex) { - // TODO: ignore/reset this when we switch to the alt screen - let position = self.viewport_offset - delta; self.set_scroll_viewport(position); } @@ -1605,6 +1603,7 @@ impl TerminalState { self.alt_screen_is_active = true; self.set_cursor_pos(&Position::Absolute(0), &Position::Absolute(0)); self.perform_csi(CSIAction::EraseInDisplay(DisplayErase::All)); + self.set_scroll_viewport(0); } (false, true) => { self.alt_screen_is_active = false;