LibLine: Do not ignore ^C and do not finish() after interrupt

This commit is contained in:
AnotherTest 2020-04-22 14:18:17 +04:30 committed by Andreas Kling
commit 1a7af4d677
Notes: sideshowbarker 2024-07-19 07:23:59 +09:00

View file

@ -152,6 +152,10 @@ String Editor::get_line(const String& prompt)
if (m_was_resized) if (m_was_resized)
continue; continue;
finish();
continue;
}
m_was_interrupted = false; m_was_interrupted = false;
if (!m_buffer.is_empty()) if (!m_buffer.is_empty())
@ -159,9 +163,7 @@ String Editor::get_line(const String& prompt)
m_buffer.clear(); m_buffer.clear();
m_cursor = 0; m_cursor = 0;
} m_refresh_needed = true;
finish();
continue; continue;
} }
perror("read failed"); perror("read failed");