vim: Fix scrolling

After #2641 we noticed that scrolling didn't take a count parameter.

The PageDown/PageUp logic was also broken by an additional -1 (for both
vim mode and not).
This commit is contained in:
Conrad Irwin 2023-06-26 12:23:58 -06:00
parent 3f4a06f576
commit 02fc5dd6c9
7 changed files with 195 additions and 106 deletions

View file

@ -368,7 +368,7 @@ impl Editor {
}
let cur_position = self.scroll_position(cx);
let new_pos = cur_position + vec2f(0., amount.lines(self) - 1.);
let new_pos = cur_position + vec2f(0., amount.lines(self));
self.set_scroll_position(new_pos, cx);
}