Skip to content

Commit

Permalink
Use Range::with_direction consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Sep 22, 2022
1 parent 3f27971 commit 99bde07
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2159,10 +2159,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);
}
Expand Down

0 comments on commit 99bde07

Please sign in to comment.