@@ -42,7 +42,7 @@ pub fn move_line_down(view: &mut View, count: usize) {
42 .move_selection(Direction::Forward, Granularity::Line, count);
42 .move_selection(Direction::Forward, Granularity::Line, count);
45−pub fn move_line_end(view: &mut View, count: usize) {
45+pub fn move_line_end(view: &mut View, _count: usize) {
46 // TODO: use a transaction
46 // TODO: use a transaction
47 let lines = selection_lines(&view.state);
47 let lines = selection_lines(&view.state);
@@ -64,7 +64,7 @@ pub fn move_line_end(view: &mut View, count: usize) {
64 transaction.apply(&mut view.state);
64 transaction.apply(&mut view.state);
67−pub fn move_line_start(view: &mut View, count: usize) {
67+pub fn move_line_start(view: &mut View, _count: usize) {
68 let lines = selection_lines(&view.state);
68 let lines = selection_lines(&view.state);
70 let positions = lines
70 let positions = lines
@@ -208,24 +208,24 @@ fn selection_lines(state: &State) -> Vec<usize> {
208 .map(|range| state.doc.char_to_line(range.head))
208 .map(|range| state.doc.char_to_line(range.head))
209 .collect::<Vec<_>>();
209 .collect::<Vec<_>>();
211− lines.sort();
211+ lines.sort_unstable(); // sorting by usize so _unstable is preferred
212 lines.dedup();
212 lines.dedup();
217// I inserts at the start of each line with a selection
217// I inserts at the start of each line with a selection
218−pub fn prepend_to_line(view: &mut View, _count: usize) {
218+pub fn prepend_to_line(view: &mut View, count: usize) {
219 view.state.mode = Mode::Insert;
219 view.state.mode = Mode::Insert;
221− move_line_start(view, _count);
221+ move_line_start(view, count);
224// A inserts at the end of each line with a selection
224// A inserts at the end of each line with a selection
225−pub fn append_to_line(view: &mut View, _count: usize) {
225+pub fn append_to_line(view: &mut View, count: usize) {
226 view.state.mode = Mode::Insert;
226 view.state.mode = Mode::Insert;
228− move_line_end(view, _count);
228+ move_line_end(view, count);
231// o inserts a new line after each line with a selection
231// o inserts a new line after each line with a selection