Use Range::with_direction consistently

pull/1/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 let selection = doc
.selection(view.id) .selection(view.id)
.clone() .clone()
.transform(|r| match r.direction() { .transform(|r| r.with_direction(Direction::Forward));
Direction::Forward => r,
Direction::Backward => r.flip(),
});
doc.set_selection(view.id, selection); doc.set_selection(view.id, selection);
} }

Loading…
Cancel
Save