diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-21 19:37:14 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-21 17:09:41 +0200 |
commit | cf4870c93e274ad7f0620f86241b85de9a2adc76 (patch) | |
tree | 393b2172b6275af52c2e9466112af68e8300eb67 /Libraries | |
parent | 8d293601b6948314899a13135402af24a4bc32eb (diff) | |
download | serenity-cf4870c93e274ad7f0620f86241b85de9a2adc76.zip |
LibLine: Do not ignore Ctrl-C when buffer is empty
I am told that this is how people test their shells.
That's bizarre to me, but sure :^)
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibLine/Editor.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index 458f08d30d..815b33ee39 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -563,17 +563,12 @@ void Editor::handle_interrupt_event() } } - if (!m_buffer.is_empty()) { - fprintf(stderr, "^C"); - fflush(stderr); - } + fprintf(stderr, "^C"); + fflush(stderr); if (on_interrupt_handled) on_interrupt_handled(); - if (m_buffer.is_empty()) - return; - m_buffer.clear(); m_cursor = 0; |