use a DynamicSelectionList when searching as the buffer may be modified during the prompt
This commit is contained in:
parent
86f6282cbe
commit
6df60f5d2f
|
@ -223,7 +223,7 @@ template<SelectMode mode, bool forward>
|
||||||
void search(Context& context)
|
void search(Context& context)
|
||||||
{
|
{
|
||||||
const char* prompt = forward ? "search:" : "reverse search:";
|
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,
|
context.input_handler().prompt(prompt, get_color("Prompt"), complete_nothing,
|
||||||
[selections](const String& str, PromptEvent event, Context& context) {
|
[selections](const String& str, PromptEvent event, Context& context) {
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue
Block a user