summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-02-07 03:14:42 +0330
committerAndreas Kling <kling@serenityos.org>2021-02-07 13:12:56 +0100
commit6985b4008a7983f67808b7566df70e72f0165ecd (patch)
tree30869dd320f537df25f2eb231d7fed6c15a4ff69
parent3a231c00aa80fe1e2ff38771874cb6b680558308 (diff)
downloadserenity-6985b4008a7983f67808b7566df70e72f0165ecd.zip
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.
-rw-r--r--Userland/Libraries/LibLine/InternalFunctions.cpp3
1 files changed, 2 insertions, 1 deletions
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;