From 6985b4008a7983f67808b7566df70e72f0165ecd Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sun, 7 Feb 2021 03:14:42 +0330 Subject: [PATCH] LibLine: Place the search editor prompt at the right line after ^L ...as the search editor prompt has to always stay after the main prompt preview. --- Userland/Libraries/LibLine/InternalFunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibLine/InternalFunctions.cpp b/Userland/Libraries/LibLine/InternalFunctions.cpp index b031e3a396..b1ec249553 100644 --- a/Userland/Libraries/LibLine/InternalFunctions.cpp +++ b/Userland/Libraries/LibLine/InternalFunctions.cpp @@ -293,7 +293,8 @@ void Editor::enter_search() // move the search prompt below ours // and tell it to redraw itself - search_editor.set_origin(2, 1); + auto prompt_end_line = current_prompt_metrics().lines_with_addition(m_cached_buffer_metrics, m_num_columns); + search_editor.set_origin(prompt_end_line + 1, 1); search_editor.m_refresh_needed = true; return false;