summaryrefslogtreecommitdiff
path: root/Shell
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-08-20 20:04:55 +0430
committerAndreas Kling <kling@serenityos.org>2020-08-21 16:10:51 +0200
commit238e87de4e0b805caad470c70acef989e493b810 (patch)
tree68991d85a82c62257feeceb05ee607d675adbb85 /Shell
parentc8cf4651742053e11b72d736bb59a6714e89d8c7 (diff)
downloadserenity-238e87de4e0b805caad470c70acef989e493b810.zip
LibLine: Handle Ctrl-C and Ctrl-D in a way similar to other line editors
Makes C-c print "^C" and continue prompting on a new line. Also fixes a problem where an interrupted get_line() would need more read()'s than required to update the display.
Diffstat (limited to 'Shell')
-rw-r--r--Shell/main.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/Shell/main.cpp b/Shell/main.cpp
index f8671a9fb8..a3fdf5e6a2 100644
--- a/Shell/main.cpp
+++ b/Shell/main.cpp
@@ -238,10 +238,6 @@ int main(int argc, char** argv)
return 1;
}
- editor->on_interrupt_handled = [&] {
- editor->finish();
- };
-
shell->add_child(*editor);
Core::EventLoop::current().post_event(*shell, make<Core::CustomEvent>(Shell::ShellEventType::ReadLine));