Remove unused translation from test program

This commit is contained in:
Jonathan Daugherty 2015-05-16 19:17:25 -07:00
parent d73f892dae
commit a720b498c8

View File

@ -12,7 +12,6 @@ import Brick
data St = data St =
St { _stEditor :: Editor St { _stEditor :: Editor
, _trans :: Location
} }
makeLenses ''St makeLenses ''St
@ -32,16 +31,11 @@ handleEvent e st =
case e of case e of
EvKey KEsc [] -> exitSuccess EvKey KEsc [] -> exitSuccess
EvKey KEnter [] -> error $ editStr $ st^.stEditor EvKey KEnter [] -> error $ editStr $ st^.stEditor
EvKey KLeft [MCtrl] -> return $ st & trans %~ (<> (Location (-1, 0)))
EvKey KRight [MCtrl] -> return $ st & trans %~ (<> (Location (1, 0)))
EvKey KUp [MCtrl] -> return $ st & trans %~ (<> (Location (0, -1)))
EvKey KDown [MCtrl] -> return $ st & trans %~ (<> (Location (0, 1)))
ev -> return $ st & stEditor %~ (editEvent ev) ev -> return $ st & stEditor %~ (editEvent ev)
initialState :: St initialState :: St
initialState = initialState =
St { _stEditor = editor (Name "edit") "" St { _stEditor = editor (Name "edit") ""
, _trans = Location (0, 0)
} }
theApp :: App St Event theApp :: App St Event