Use Range::with_direction consistently
This commit is contained in:
parent
274f2ea459
commit
032d76ccf2
1 changed files with 1 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue