@@ -173,10 +173,6 @@ impl Command {
173173 self.doc
174174 }
175175
176− pub fn fun(&self) -> fn(&mut Context) {
177− self.fun
178− }
179−
180176 #[rustfmt::skip]
181177 commands!(
182178 no_op, "Do nothing",
@@ -607,15 +603,8 @@ fn kill_to_line_end(cx: &mut Context) {
607603
608604 let selection = doc.selection(view.id).clone().transform(|range| {
609605 let line = range.cursor_line(text);
610− let line_end_pos = line_end_char_index(&text, line);
611− let pos = range.cursor(text);
612−
613− let mut new_range = range.put_cursor(text, line_end_pos, true);
614− // don't want to remove the line separator itself if the cursor doesn't reach the end of line.
615− if pos != line_end_pos {
616− new_range.head = line_end_pos;
617− }
618− new_range
606+ let pos = line_end_char_index(&text, line);
607+ range.put_cursor(text, pos, true)
619608 });
620609 delete_selection_insert_mode(doc, view, &selection);
621610}
@@ -3512,12 +3501,12 @@ fn open(cx: &mut Context, open: Open) {
35123501}
35133502
35143503// o inserts a new line after each line with a selection
3515−pub(crate) fn open_below(cx: &mut Context) {
3504+fn open_below(cx: &mut Context) {
35163505 open(cx, Open::Below)
35173506}
35183507
35193508// O inserts a new line before each line with a selection
3520−pub(crate) fn open_above(cx: &mut Context) {
3509+fn open_above(cx: &mut Context) {
35213510 open(cx, Open::Above)
35223511}
35233512