aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorMichael Davis2022-07-30 14:29:07 +0000
committerBlaž Hrastnik2022-10-03 14:44:08 +0000
commit032d76ccf2ed4f46c51bf60d190c23edc6b26220 (patch)
tree0ef84c89862b845eb7c30db2c29139bec50c35bb /helix-term/src
parent274f2ea45979098a96b7a6d94ecc18351826eaea (diff)
Use Range::with_direction consistently
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 53a34c00..b2378222 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2177,10 +2177,7 @@ fn ensure_selections_forward(cx: &mut Context) {
let selection = doc
.selection(view.id)
.clone()
- .transform(|r| match r.direction() {
- Direction::Forward => r,
- Direction::Backward => r.flip(),
- });
+ .transform(|r| r.with_direction(Direction::Forward));
doc.set_selection(view.id, selection);
}