mirror of https://github.com/helix-editor/helix
Use Range::with_direction consistently
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…
Reference in New Issue