diff --git a/src/normal.cc b/src/normal.cc index 6710802e..e4c5995d 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -27,7 +27,6 @@ enum class SelectMode Replace, Extend, Append, - ReplaceMain, }; template @@ -44,15 +43,6 @@ void select(Context& context, Func func) selections.push_back(res); selections.set_main_index(selections.size() - 1); } - else if (mode == SelectMode::ReplaceMain) - { - auto& sel = selections.main(); - auto res = func(buffer, sel); - sel.anchor() = res.anchor(); - sel.cursor() = res.cursor(); - if (not res.captures().empty()) - sel.captures() = std::move(res.captures()); - } else { for (auto& sel : selections) @@ -429,8 +419,6 @@ void select_next_match(const Buffer& buffer, SelectionList& selections, for (auto& sel : selections) sel.merge_with(find_next_match(buffer, sel, regex)); } - else if (mode == SelectMode::ReplaceMain) - selections.main() = find_next_match(buffer, selections.main(), regex); else if (mode == SelectMode::Append) { selections.push_back(find_next_match(buffer, selections.main(), regex));