From 72be9042593289c88498ad6b58ef3a6c7f753e5b Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Tue, 12 Jan 2021 23:31:23 +0330 Subject: [PATCH] LibLine: Use StringView::find() to find '::' in history entries Fixes an issue mentioned in #4926. --- Userland/Libraries/LibLine/Editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 0ac1fe100c4..22ce831c896 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -292,7 +292,7 @@ bool Editor::save_history(const String& path) merge( file->line_begin(), file->line_end(), m_history.begin(), m_history.end(), final_history, [](StringView str) { - auto it = str.find_first_of("::").value_or(0); + auto it = str.find("::").value_or(0); auto time = str.substring_view(0, it).to_uint().value_or(0); auto string = str.substring_view(it == 0 ? it : it + 2); return HistoryEntry { string, time };