mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 10:48:53 +00:00
LibLine: Clear the buffer after invalidating prior written data
Otherwise this would set m_chars_touched_in_the_middle to zero, which is exactly the wrong thing to do.
This commit is contained in:
parent
c580348ebd
commit
cad7865ad1
Notes:
sideshowbarker
2024-07-18 21:39:54 +09:00
Author: https://github.com/alimpfard
Commit: cad7865ad1
Pull-request: https://github.com/SerenityOS/serenity/pull/5652
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/BenWiederhake
1 changed files with 1 additions and 1 deletions
|
@ -316,8 +316,8 @@ void Editor::clear_line()
|
||||||
fputc(0x8, stderr);
|
fputc(0x8, stderr);
|
||||||
fputs("\033[K", stderr);
|
fputs("\033[K", stderr);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
m_buffer.clear();
|
|
||||||
m_chars_touched_in_the_middle = buffer().size();
|
m_chars_touched_in_the_middle = buffer().size();
|
||||||
|
m_buffer.clear();
|
||||||
m_cursor = 0;
|
m_cursor = 0;
|
||||||
m_inline_search_cursor = m_cursor;
|
m_inline_search_cursor = m_cursor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue