Use Range::with_direction consistently

pull/4085/head
Michael Davis 2 years ago committed by Blaž Hrastnik
parent 274f2ea459
commit 032d76ccf2

@ -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);
}

Loading…
Cancel
Save