From 7ecf29f206eb8e471a9efc77b3356f4881fd635c Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Wed, 29 Apr 2020 00:31:22 +0430 Subject: 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. --- Userland/js.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland') 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(); signal(SIGINT, [](int) { - sigint_handler(); + if (!s_editor->is_editing()) + sigint_handler(); s_editor->interrupted(); }); -- cgit v1.2.3