on master help sign in
Use Range::with_direction consistently
commit032d76ccf2ed4f46c51bf60d190c23edc6b26220 authorMichael Davis <mcarsondavis@gmail.com> dateSat 30 Jul 2022, 09:29 (4 years ago) parent274f2ea
1 file changed+1−4
helix-term/src/commands.rs+1−4
helix-term/src/commands.rs+1−4
@@ -2177,10 +2177,7 @@ fn ensure_selections_forward(cx: &mut Context) {
21772177 let selection = doc
21782178 .selection(view.id)
21792179 .clone()
2180− .transform(|r| match r.direction() {
2181− Direction::Forward => r,
2182− Direction::Backward => r.flip(),
2183− });
2180+ .transform(|r| r.with_direction(Direction::Forward));
21842181
21852182 doc.set_selection(view.id, selection);
21862183}