From b1fc6f4aecb5b372d30254576c11f08bc909efe7 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 1 Mar 2017 09:59:53 -0700 Subject: factor out --- UI.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UI.hs b/UI.hs index 652b4d8..d224be1 100644 --- a/UI.hs +++ b/UI.hs @@ -107,9 +107,11 @@ handleRET :: St -> EventM () (Next St) handleRET st = halt $ setScanSessCommand FinalPage st handleSPC :: St -> EventM () (Next St) -handleSPC st = case st^.stOutFormat of - PDF -> halt $ setScanSessCommand NextPage st - PNG -> halt $ setScanSessCommand FinalPage st +handleSPC st = halt $ setScanSessCommand + (case st^.stOutFormat of + PDF -> NextPage + PNG -> FinalPage) + st handleESC :: St -> EventM () (Next St) handleESC st = ifScanSess st -- cgit v1.2.3