From f8fe273a2e52659f89c82f94fab4b2800518bbea Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 8 Jun 2020 00:31:11 +0900 Subject: Fix build. --- helix-core/src/state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helix-core/src/state.rs') diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index 7eae467d..05380d5e 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -142,8 +142,8 @@ fn move_vertically(text: &RopeSlice, dir: Direction, pos: usize, count: usize) - let (line, col) = coords_at_pos(text, pos); let new_line = match dir { - Direction::Backward => line.saturating_sub(n), - Direction::Forward => std::cmp::min(line.saturating_add(n), text.len_lines() - 1), + Direction::Backward => line.saturating_sub(count), + Direction::Forward => std::cmp::min(line.saturating_add(count), text.len_lines() - 1), }; // convert to 0-indexed -- cgit v1.2.3-70-g09d2