From 9e45eea0c9af692dee1909b80d0c0552c385cf8c Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Fri, 1 Jul 2016 21:12:30 -0700 Subject: [PATCH] Fix sign error with scroll directions This resolves an issue with the htop process list becoming corrupt. --- src/term.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/term.rs b/src/term.rs index 0ddd8f00..aff95b55 100644 --- a/src/term.rs +++ b/src/term.rs @@ -466,11 +466,11 @@ impl ansi::Handler for Term { fn set_horizontal_tabstop(&mut self) { println!("set_horizontal_tabstop"); } fn scroll_up(&mut self, rows: i64) { println!("scroll_up: {}", rows); - self.scroll(-rows as isize); + self.scroll(rows as isize); } fn scroll_down(&mut self, rows: i64) { println!("scroll_down: {}", rows); - self.scroll(rows as isize); + self.scroll(-rows as isize); } fn insert_blank_lines(&mut self, count: i64) { println!("insert_blank_lines: {}", count);