mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibLine: Properly update the main editor when clearing the search editor
This broke after the lazy update change :P
This commit is contained in:
parent
bf68939bcc
commit
21cbcdd7da
Notes:
sideshowbarker
2024-07-18 21:58:03 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/21cbcdd7da3 Pull-request: https://github.com/SerenityOS/serenity/pull/5492 Issue: https://github.com/SerenityOS/serenity/issues/5465
1 changed files with 8 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/TemporaryChange.h>
|
||||
#include <LibLine/Editor.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
@ -260,7 +261,7 @@ void Editor::enter_search()
|
|||
|
||||
// Move the search prompt below ours and tell it to redraw itself.
|
||||
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.set_origin(prompt_end_line + m_origin_row, 1);
|
||||
search_editor.m_refresh_needed = true;
|
||||
};
|
||||
|
||||
|
@ -300,9 +301,12 @@ void Editor::enter_search()
|
|||
fprintf(stderr, "\033[3J\033[H\033[2J"); // Clear screen.
|
||||
|
||||
// refresh our own prompt
|
||||
set_origin(1, 1);
|
||||
m_refresh_needed = true;
|
||||
refresh_display();
|
||||
{
|
||||
TemporaryChange refresh_change { m_always_refresh, true };
|
||||
set_origin(1, 1);
|
||||
m_refresh_needed = true;
|
||||
refresh_display();
|
||||
}
|
||||
|
||||
// move the search prompt below ours
|
||||
// and tell it to redraw itself
|
||||
|
|
Loading…
Reference in a new issue