1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-25 20:41:49 +03:00

use a DynamicSelectionList when searching as the buffer may be modified during the prompt

This commit is contained in:
Maxime Coste 2013-04-22 18:49:52 +02:00
parent 86f6282cbe
commit 6df60f5d2f

View File

@ -223,7 +223,7 @@ template<SelectMode mode, bool forward>
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