aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/state.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-06-07 15:31:11 +0000
committerBlaž Hrastnik2020-06-07 15:41:37 +0000
commitf8fe273a2e52659f89c82f94fab4b2800518bbea (patch)
treea88825798d4db9fe3e4125eba3d554672da65d4b /helix-core/src/state.rs
parent843c20a5504a110dd0bc726d84062851290f1afe (diff)
Fix build.
Diffstat (limited to 'helix-core/src/state.rs')
-rw-r--r--helix-core/src/state.rs4
1 files changed, 2 insertions, 2 deletions
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