1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +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:
AnotherTest 2021-03-05 15:31:13 +03:30 committed by Andreas Kling
parent c580348ebd
commit cad7865ad1

View file

@ -316,8 +316,8 @@ void Editor::clear_line()
fputc(0x8, stderr);
fputs("\033[K", stderr);
fflush(stderr);
m_buffer.clear();
m_chars_touched_in_the_middle = buffer().size();
m_buffer.clear();
m_cursor = 0;
m_inline_search_cursor = m_cursor;
}