on master help sign in
fix: copy_selections was broken with selections (not cursors)
commit236c6b77077596f8c7b5a5377e23e96ecec45e07 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 1 Apr 2022, 10:10 (5 years ago) parent924462e
1 file changed+2−1
helix-term/src/commands.rs+2−1
helix-term/src/commands.rs+2−1
@@ -1392,7 +1392,8 @@ fn copy_selection_on_line(cx: &mut Context, direction: Direction) {
13921392 if is_primary {
13931393 primary_index = ranges.len();
13941394 }
1395− ranges.push(Range::new(anchor, head));
1395+ // This is Range::new(anchor, head), but it will place the cursor on the correct column
1396+ ranges.push(Range::point(anchor).put_cursor(text, head, true));
13961397 sels += 1;
13971398 }
13981399