From 96da93efd63ff3cf7e9f02b6dd3086bc3f876de9 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Thu, 15 Feb 2018 19:34:23 -0800 Subject: wip fix scroll_down --- src/grid/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/grid/mod.rs') diff --git a/src/grid/mod.rs b/src/grid/mod.rs index 1889d59f..23ee9cf4 100644 --- a/src/grid/mod.rs +++ b/src/grid/mod.rs @@ -236,8 +236,11 @@ impl Grid { self.raw.rotate_up(*positions); // Now, restore any scroll region lines - for i in IndexRange(region.end .. self.num_lines()) { + let lines = self.lines; + for i in IndexRange(region.end .. lines) { // First do the swap + // TODO there is a bug here causing a panic. + // TODO math self.raw.swap_lines(i, i + positions); } -- cgit v1.2.3-54-g00ecf