@@ -446,8 +446,6 @@ fn extend_next_word_end(cx: &mut Context) {
446446#[inline]
447447fn find_char_impl<F>(cx: &mut Context, search_fn: F, inclusive: bool, extend: bool)
448448where
449− // TODO: make an options struct for and abstract this Fn into a searcher type
450− // use the definition for w/b/e too
451449 F: Fn(RopeSlice, char, usize, usize, bool) -> Option<usize> + 'static,
452450{
453451 // TODO: count is reset to 1 before next key so we move it into the closure here.
@@ -652,10 +650,6 @@ fn scroll(cx: &mut Context, offset: usize, direction: Direction) {
652650
653651 let scrolloff = PADDING.min(view.area.height as usize / 2); // TODO: user pref
654652
655− // cursor visual offset
656− // TODO: only if dragging via mouse?
657− // let cursor_off = cursor.row - view.first_line;
658−
659653 view.first_line = match direction {
660654 Forward => view.first_line + offset,
661655 Backward => view.first_line.saturating_sub(offset),
@@ -812,13 +806,6 @@ fn split_selection_on_newline(cx: &mut Context) {
812806 doc.set_selection(view.id, selection);
813807}
814808
815−// search: searches for the first occurence in file, provides a prompt
816−// search_next: reuses the last search regex and searches for the next match. The next match becomes the main selection.
817−// -> we always search from after the cursor.head
818−// TODO: be able to use selection as search query (*/alt *)
819−// I'd probably collect all the matches right now and store the current index. The cache needs
820−// wiping if input happens.
821−
822809fn search_impl(doc: &mut Document, view: &mut View, contents: &str, regex: &Regex, extend: bool) {
823810 let text = doc.text();
824811 let selection = doc.selection(view.id);
@@ -847,7 +834,6 @@ fn search_impl(doc: &mut Document, view: &mut View, contents: &str, regex: &Rege
847834 Selection::single(start, head)
848835 };
849836
850− // TODO: (first_match, regex) stuff in register?
851837 doc.set_selection(view.id, selection);
852838 align_view(doc, view, Align::Center);
853839 };
@@ -905,12 +891,6 @@ fn search_selection(cx: &mut Context) {
905891 search_next(cx);
906892}
907893
908−// TODO: N -> search_prev
909−// need to loop around buffer also and show a message
910−// same for no matches
911−
912−//
913−
914894fn extend_line(cx: &mut Context) {
915895 let count = cx.count();
916896 let (view, doc) = current!(cx.editor);
@@ -931,8 +911,6 @@ fn extend_line(cx: &mut Context) {
931911 doc.set_selection(view.id, Selection::single(start, end));
932912}
933913
934−// heuristic: append changes to history after each command, unless we're in insert mode
935−
936914fn delete_selection_impl(reg: &mut Register, doc: &mut Document, view_id: ViewId) {
937915 // first yank the selection
938916 let values: Vec<String> = doc
@@ -1568,9 +1546,6 @@ mod cmd {
15681546}
15691547
15701548fn command_mode(cx: &mut Context) {
1571− // TODO: completion items should have a info section that would get displayed in
1572− // a popup above the prompt when items are tabbed over
1573−
15741549 let mut prompt = Prompt::new(
15751550 ":".to_owned(),
15761551 |input: &str| {
@@ -2522,7 +2497,6 @@ fn redo(cx: &mut Context) {
25222497// Yank / Paste
25232498
25242499fn yank(cx: &mut Context) {
2525− // TODO: should selections be made end inclusive?
25262500 let (view, doc) = current!(cx.editor);
25272501 let values: Vec<String> = doc
25282502 .selection(view.id)
@@ -2703,16 +2677,6 @@ fn replace_selections_with_clipboard(cx: &mut Context) {
27032677 replace_selections_with_clipboard_impl(&mut cx.editor);
27042678}
27052679
2706−// alt-p => paste every yanked selection after selected text
2707−// alt-P => paste every yanked selection before selected text
2708−// R => replace selected text with yanked text
2709−// alt-R => replace selected text with every yanked text
2710−//
2711−// append => insert at next line
2712−// insert => insert at start of line
2713−// replace => replace
2714−// default insert
2715−
27162680fn paste_after(cx: &mut Context) {
27172681 let reg_name = cx.selected_register.name();
27182682 let (view, doc) = current!(cx.editor);
@@ -3019,12 +2983,6 @@ fn completion(cx: &mut Context) {
30192983 };
30202984 },
30212985 );
3022− // TODO: Server error: content modified
3023−
3024− // // TODO!: when iterating over items, show the docs in popup
3025−
3026− // // language server client needs to be accessible via a registry of some sort
3027− //}
30282986}
30292987
30302988fn hover(cx: &mut Context) {