aboutsummaryrefslogtreecommitdiff
path: root/src/grid/mod.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2018-02-15 19:34:23 -0800
committerJoe Wilm <joe@jwilm.com>2018-03-07 09:47:21 -0800
commit96da93efd63ff3cf7e9f02b6dd3086bc3f876de9 (patch)
tree0d82dc5edcbedf6e41130d7c7b0225190278f3aa /src/grid/mod.rs
parent8854124ff09e4518721e1f4468d2952a305a5284 (diff)
downloadalacritty-96da93efd63ff3cf7e9f02b6dd3086bc3f876de9.tar.gz
alacritty-96da93efd63ff3cf7e9f02b6dd3086bc3f876de9.zip
wip fix scroll_down
Diffstat (limited to 'src/grid/mod.rs')
-rw-r--r--src/grid/mod.rs5
1 files changed, 4 insertions, 1 deletions
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<T: Copy + Clone> Grid<T> {
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);
}