From 7390b37f0a907d764e0b183ca307f37c20bb068b Mon Sep 17 00:00:00 2001 From: defanor Date: Thu, 16 Nov 2017 03:17:28 +0300 Subject: Handle SIGINT during getLine It is too easy to kill pancake by accident, while trying to interrupt a child process that finishes by itself right at that moment. So, only quitting if there's two interruptions in a row (without any input between them). Minor refactoring has also happened in this commit. --- Pancake/Command.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Pancake') diff --git a/Pancake/Command.hs b/Pancake/Command.hs index 57b80c2..97cb25c 100644 --- a/Pancake/Command.hs +++ b/Pancake/Command.hs @@ -21,6 +21,7 @@ import Pancake.Configuration -- | Interactive user command. data Command = Quit + | Interrupt | Follow Int | More | GoTo (Maybe String) URI -- cgit v1.2.3