summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/vi_mode.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/vi_mode.rs')
-rw-r--r--alacritty_terminal/src/vi_mode.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/alacritty_terminal/src/vi_mode.rs b/alacritty_terminal/src/vi_mode.rs
index 7fa6c148..650c3a8a 100644
--- a/alacritty_terminal/src/vi_mode.rs
+++ b/alacritty_terminal/src/vi_mode.rs
@@ -385,11 +385,10 @@ fn last_occupied_in_line<T>(term: &Term<T>, line: usize) -> Option<Point<usize>>
/// Advance point based on direction.
fn advance<T>(term: &Term<T>, point: Point<usize>, left: bool) -> Point<usize> {
- let cols = term.grid().num_cols();
if left {
- point.sub_absolute(cols.0, 1)
+ point.sub_absolute(term.grid().num_cols(), 1)
} else {
- point.add_absolute(cols.0, 1)
+ point.add_absolute(term.grid().num_cols(), 1)
}
}
@@ -679,7 +678,7 @@ mod tests {
#[test]
fn scroll_semantic() {
let mut term = term();
- term.grid_mut().scroll_up(&(Line(0)..Line(20)), Line(5), &Default::default());
+ term.grid_mut().scroll_up(&(Line(0)..Line(20)), Line(5), Default::default());
let mut cursor = ViModeCursor::new(Point::new(Line(0), Column(0)));
@@ -755,7 +754,7 @@ mod tests {
#[test]
fn scroll_word() {
let mut term = term();
- term.grid_mut().scroll_up(&(Line(0)..Line(20)), Line(5), &Default::default());
+ term.grid_mut().scroll_up(&(Line(0)..Line(20)), Line(5), Default::default());
let mut cursor = ViModeCursor::new(Point::new(Line(0), Column(0)));