diff options
author | Nathan Vegdahl | 2021-07-08 23:45:19 +0000 |
---|---|---|
committer | Nathan Vegdahl | 2021-07-08 23:47:20 +0000 |
commit | b4c59b444cc4963f95a95fe10f166e58ef857288 (patch) | |
tree | 7702d19b657345dbb937363120a7e22648136c58 /helix-core/src/movement.rs | |
parent | 753f7f381b96f591be3c0e37a93b90776c5405cb (diff) |
Update surround commands to work with gap indexing.
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r-- | helix-core/src/movement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs index 0e2a2a42..2cb4b40d 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -56,7 +56,7 @@ pub fn move_horizontally( }; // Compute the final new range. - range.put(slice, behaviour == Extend, new_pos) + range.put(slice, new_pos, behaviour == Extend) } pub fn move_vertically( @@ -106,7 +106,7 @@ pub fn move_vertically( new_pos }; - let mut new_range = range.put(slice, true, new_head); + let mut new_range = range.put(slice, new_head, true); new_range.horiz = Some(horiz); new_range } @@ -427,7 +427,7 @@ mod test { #[test] fn vertical_moves_in_single_column() { let text = Rope::from(MULTILINE_SAMPLE); - let slice = dbg!(&text).slice(..); + let slice = text.slice(..); let position = pos_at_coords(slice, (0, 0).into()); let mut range = Range::point(position); let moves_and_expected_coordinates = IntoIter::new([ |