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
|
-- | Handles an event
|
||||||
eventHandler :: Handler
|
eventHandler :: Handler
|
||||||
eventHandler (VtyEvent (EvKey (KChar 'c') [MCtrl])) = halt
|
eventHandler (VtyEvent (EvKey (KChar 'c') [MCtrl])) = halt
|
||||||
|
eventHandler (VtyEvent (EvKey (KChar 'q') [])) = halt
|
||||||
eventHandler (VtyEvent (EvKey (KChar 'c') [])) =
|
eventHandler (VtyEvent (EvKey (KChar 'c') [])) =
|
||||||
modify $ hammingCode %~ setCheckBits
|
modify $ hammingCode %~ setCheckBits
|
||||||
eventHandler (VtyEvent (EvKey (KChar 'v') [])) =
|
eventHandler (VtyEvent (EvKey (KChar 'v') [])) =
|
||||||
|
@ -57,7 +58,6 @@ eventHandler e = gets (^.appMode) >>= \case
|
||||||
EditMode _ -> editHandler e
|
EditMode _ -> editHandler e
|
||||||
|
|
||||||
displayHandler :: Handler
|
displayHandler :: Handler
|
||||||
displayHandler (VtyEvent (EvKey (KChar 'q') [])) = halt
|
|
||||||
displayHandler (VtyEvent (EvKey (KChar 'e') [])) =
|
displayHandler (VtyEvent (EvKey (KChar 'e') [])) =
|
||||||
modify $ appMode .~ EditMode initialEditor
|
modify $ appMode .~ EditMode initialEditor
|
||||||
displayHandler _ = return ()
|
displayHandler _ = return ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user