1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibLine: Make ^R search match the input anywhere in a given line

This is closer to what other line editors (and shells) do, and makes ^R
actually useful.
This commit is contained in:
AnotherTest 2020-09-07 00:44:55 +04:30 committed by Andreas Kling
parent da56e208ef
commit da1b080935
3 changed files with 5 additions and 4 deletions

View file

@ -244,7 +244,7 @@ void Editor::enter_search()
m_search_editor->on_display_refresh = [this](Editor& search_editor) {
StringBuilder builder;
builder.append(Utf32View { search_editor.buffer().data(), search_editor.buffer().size() });
if (!search(builder.build())) {
if (!search(builder.build(), false, false)) {
m_buffer.clear();
m_cursor = 0;
}