From fbf7856e3ec40d58444d88fc9852db8e38cb68e7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 14 May 2014 00:27:41 +0100 Subject: [PATCH] use plain SelectionList for regex_prompt --- src/normal.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index 15068fce..14526d2f 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -599,13 +599,14 @@ void paste(Context& context, int) template void regex_prompt(Context& context, const String prompt, T func) { - DynamicSelectionList selections{context.selections()}; + SelectionList selections = context.selections(); context.input_handler().prompt(prompt, "", get_color("Prompt"), complete_nothing, - [=](const String& str, PromptEvent event, Context& context) { + [=](const String& str, PromptEvent event, Context& context) mutable { try { if (event != PromptEvent::Change and context.has_ui()) context.ui().info_hide(); + selections.update(); context.selections() = selections; context.input_handler().set_prompt_colors(get_color("Prompt")); if (event == PromptEvent::Abort)