mirror of
https://github.com/alacritty/alacritty.git
synced 2026-12-02 01:35:05 +03:00
wip fix scroll_down
This commit is contained in:
1 parent
8854124ff0
commit
96da93efd6
2 files changed
+5
-1
No files matched your search
+4
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ impl<T> Storage<T> {
|
||||
}
|
||||
|
||||
pub fn swap_lines(&mut self, a: Line, b: Line) {
|
||||
println!("visible: {}, a: {}, b: {}", self.visible_lines, a, b);
|
||||
let a = self.visible_lines - a;
|
||||
let b = self.visible_lines - b;
|
||||
self.swap(*a, *b);
|
||||
|
||||
Reference in new issue
Block a user