aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/movement.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-22 20:21:44 +0000
committerNathan Vegdahl2021-07-22 20:21:44 +0000
commitfd684ef6931d11632274d87c9a42d4fabb51c074 (patch)
tree43ed799c08fd8fabafb7ce9efea03341b94d48df /helix-core/src/movement.rs
parent5841954f58702ba2eabc17d96f0bf167cb13af24 (diff)
Revert display-width-based vertical cursor movement.
Still needs to be done, but should be part of a separate PR.
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r--helix-core/src/movement.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs
index 01bec47a..7f3a5ef4 100644
--- a/helix-core/src/movement.rs
+++ b/helix-core/src/movement.rs
@@ -521,16 +521,14 @@ mod test {
V,
}
let moves_and_expected_coordinates = IntoIter::new([
- // Places cursor at the fourth kana (each of which are double-wide,
- // so the visual column is 8).
- ((Axis::H, Direction::Forward, 4), (0, 8)),
- // Descent places cursor at the 8th character.
- ((Axis::V, Direction::Forward, 1usize), (1, 8)),
- // Moving back a single-width character.
- ((Axis::H, Direction::Backward, 1usize), (1, 7)),
- // Jumping back up into the middle of a double-width character shifts
- // the column to the start of that character.
- ((Axis::V, Direction::Backward, 1usize), (0, 6)),
+ // Places cursor at the fourth kana.
+ ((Axis::H, Direction::Forward, 4), (0, 4)),
+ // Descent places cursor at the 4th character.
+ ((Axis::V, Direction::Forward, 1usize), (1, 4)),
+ // Moving back 1 character.
+ ((Axis::H, Direction::Backward, 1usize), (1, 3)),
+ // Jumping back up 1 line.
+ ((Axis::V, Direction::Backward, 1usize), (0, 3)),
]);
for ((axis, direction, amount), coordinates) in moves_and_expected_coordinates {