From 9e81c2dc839e3b6a28037a60065541cb81ef5927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= Date: Fri, 25 Feb 2022 23:29:40 -0500 Subject: [PATCH] LibLine: Update inline search cursor after kill_line (^U) command After the kill_line (^U) command was used, searching backwards in the history would still filter based on the text previous to the deletion. Update the inline search cursor like already done in other internal functions, so the text used for search is the current one. --- Userland/Libraries/LibLine/InternalFunctions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibLine/InternalFunctions.cpp b/Userland/Libraries/LibLine/InternalFunctions.cpp index 9286caa46b..ba57fab492 100644 --- a/Userland/Libraries/LibLine/InternalFunctions.cpp +++ b/Userland/Libraries/LibLine/InternalFunctions.cpp @@ -170,6 +170,7 @@ void Editor::kill_line() for (size_t i = 0; i < m_cursor; ++i) remove_at_index(0); m_cursor = 0; + m_inline_search_cursor = m_cursor; m_refresh_needed = true; }