about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index c543ad468f6d..3561d35a3bb2 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -35,7 +35,8 @@ startEvent = say ["welcome"]
 handleEvent :: BrickEvent Name () -> AppM (Next GameState)
 handleEvent (VtyEvent (EvKey k mods))
   | Just command <- commandFromKey k mods
-  = handleCommand command
+  = do messageHistory %= hideMessage
+       handleCommand command
 handleEvent _ = continue
 
 handleCommand :: Command -> AppM (Next GameState)
@@ -43,4 +44,7 @@ handleCommand Quit = halt
 handleCommand (Move dir) = do
   characterPosition %= move dir
   continue
-handleCommand _ = error "unimplemented"
+
+handleCommand PreviousMessage = do
+  messageHistory %= popMessage
+  continue