summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-05-14 00:27:41 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-05-14 00:27:41 +0100
commitfbf7856e3ec40d58444d88fc9852db8e38cb68e7 (patch)
treed1d7adcb7a6dad6f6b5755fdccbf3a982f5b6341 /src/normal.cc
parent11d9b607668d56c8deaf9062d48d9ce7aa6f5928 (diff)
use plain SelectionList for regex_prompt
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc5
1 files 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<typename T>
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)