summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-08-21 19:37:14 +0430
committerAndreas Kling <kling@serenityos.org>2020-08-21 17:09:41 +0200
commitcf4870c93e274ad7f0620f86241b85de9a2adc76 (patch)
tree393b2172b6275af52c2e9466112af68e8300eb67 /Libraries
parent8d293601b6948314899a13135402af24a4bc32eb (diff)
downloadserenity-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.cpp9
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;