From d7822ea5882430dcc4e2f28d1cffc8b5c0bbf65b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 5 Aug 2023 10:39:54 +1000 Subject: [PATCH] Removed unused captures --- src/normal.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index f03ba24e..386eee5b 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -936,7 +936,7 @@ void search(Context& context, NormalParams params) const int count = params.count; regex_prompt(context, prompt.str(), reg, - [reg, count] + [count] (const Regex& regex, PromptEvent event, Context& context) { if (regex.empty() or regex.str().empty()) return; @@ -1018,7 +1018,7 @@ void select_regex(Context& context, NormalParams params) auto prompt = capture ? format("select (capture {}):", capture) : "select:"_str; regex_prompt(context, std::move(prompt), reg, - [reg, capture] + [capture] (Regex ex, PromptEvent event, Context& context) { auto& selections = context.selections(); auto& buffer = selections.buffer(); @@ -1034,7 +1034,7 @@ void split_regex(Context& context, NormalParams params) auto prompt = capture ? format("split (on capture {}):", (int)capture) : "split:"_str; regex_prompt(context, std::move(prompt), reg, - [reg, capture] + [capture] (Regex ex, PromptEvent event, Context& context) { auto& selections = context.selections(); auto& buffer = selections.buffer(); @@ -1131,7 +1131,7 @@ void keep(Context& context, NormalParams params) const char reg = to_lower(params.reg ? params.reg : '/'); regex_prompt(context, prompt.str(), reg, - [reg, selection_edition=std::make_shared(context)] + [selection_edition=std::make_shared(context)] (const Regex& regex, PromptEvent event, Context& context) { if (regex.empty() or regex.str().empty()) return;