re-enable q to quit from within edit mode
This commit is contained in:
parent
1a085ca16b
commit
4e5c07a070
|
@ -46,6 +46,7 @@ import Hamming.App.Types
|
|||
-- | Handles an event
|
||||
eventHandler :: Handler
|
||||
eventHandler (VtyEvent (EvKey (KChar 'c') [MCtrl])) = halt
|
||||
eventHandler (VtyEvent (EvKey (KChar 'q') [])) = halt
|
||||
eventHandler (VtyEvent (EvKey (KChar 'c') [])) =
|
||||
modify $ hammingCode %~ setCheckBits
|
||||
eventHandler (VtyEvent (EvKey (KChar 'v') [])) =
|
||||
|
@ -57,7 +58,6 @@ eventHandler e = gets (^.appMode) >>= \case
|
|||
EditMode _ -> editHandler e
|
||||
|
||||
displayHandler :: Handler
|
||||
displayHandler (VtyEvent (EvKey (KChar 'q') [])) = halt
|
||||
displayHandler (VtyEvent (EvKey (KChar 'e') [])) =
|
||||
modify $ appMode .~ EditMode initialEditor
|
||||
displayHandler _ = return ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user