diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-04-29 00:31:22 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-28 23:29:07 +0200 |
commit | 7ecf29f206eb8e471a9efc77b3356f4881fd635c (patch) | |
tree | 332326e29feac28c58443c558fb7c6782021608a /Userland | |
parent | 8b195d1211cc8a4b154ab82ead21d35d738f5a24 (diff) | |
download | serenity-7ecf29f206eb8e471a9efc77b3356f4881fd635c.zip |
LibLine: Ignore interrupts unless actively editing
It does not make much sense to receive an interrupt and process it
*much later*.
Also patches Userland/js to only create exceptions while some code is
actually running.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/js.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/js.cpp b/Userland/js.cpp index 69923856b8..b20e12a4cf 100644 --- a/Userland/js.cpp +++ b/Userland/js.cpp @@ -421,7 +421,8 @@ int main(int argc, char** argv) s_editor = make<Line::Editor>(); signal(SIGINT, [](int) { - sigint_handler(); + if (!s_editor->is_editing()) + sigint_handler(); s_editor->interrupted(); }); |