From 6df60f5d2ffcaa60e628e54b1df1a37dcf0bb6a2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 22 Apr 2013 18:49:52 +0200 Subject: [PATCH] use a DynamicSelectionList when searching as the buffer may be modified during the prompt --- src/normal.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/normal.cc b/src/normal.cc index 3b8db13a..7f178bbb 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -223,7 +223,7 @@ template void search(Context& context) { const char* prompt = forward ? "search:" : "reverse search:"; - SelectionList selections = context.editor().selections(); + DynamicSelectionList selections{context.buffer(), context.editor().selections()}; context.input_handler().prompt(prompt, get_color("Prompt"), complete_nothing, [selections](const String& str, PromptEvent event, Context& context) { try