Skip to content

Commit 73ecf6c

Browse files
committed
Use Range::with_direction consistently
1 parent 5fdb3a3 commit 73ecf6c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

helix-term/src/commands.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,10 +2131,7 @@ fn ensure_selections_forward(cx: &mut Context) {
21312131
let selection = doc
21322132
.selection(view.id)
21332133
.clone()
2134-
.transform(|r| match r.direction() {
2135-
Direction::Forward => r,
2136-
Direction::Backward => r.flip(),
2137-
});
2134+
.transform(|r| r.with_direction(Direction::Forward));
21382135

21392136
doc.set_selection(view.id, selection);
21402137
}

0 commit comments

Comments
 (0)