mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
LibLine: Properly handle ^C and do not return after being interrupted
this commit fixes a...surprisingly long-standing ^C bug, where it would return the buffer instead of voiding it and starting over :^)
This commit is contained in:
parent
42f06fc305
commit
e578b7884b
2 changed files with 15 additions and 10 deletions
|
@ -167,10 +167,12 @@ private:
|
|||
m_refresh_needed = true;
|
||||
m_search_offset = 0;
|
||||
if (m_reset_buffer_on_search_end) {
|
||||
m_buffer = m_pre_search_buffer;
|
||||
m_buffer.clear();
|
||||
for (auto ch : m_pre_search_buffer)
|
||||
m_buffer.append(ch);
|
||||
m_cursor = m_pre_search_cursor;
|
||||
}
|
||||
m_reset_buffer_on_search_end = false;
|
||||
m_reset_buffer_on_search_end = true;
|
||||
m_search_editor = nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue