about summary refs log tree commit diff
path: root/src/Xanthous/Command.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-09-02T14·36-0400
committerGriffin Smith <root@gws.fyi>2019-09-02T14·52-0400
commit18551cdf30c0a13bce40fae9be829e5318612e71 (patch)
treeabb2c73133a4ae99852bd5865c78b4c301943d05 /src/Xanthous/Command.hs
parentadb3b74c0c3a3bffa0d47f52036fde3623f859f7 (diff)
Add a previous message command
Add a "previous message" command, triggered via ctrl+p.

I attempted here to get the message area to still take up a row of space
post-hiding the message, but failed - should revisit that at some point
Diffstat (limited to 'src/Xanthous/Command.hs')
-rw-r--r--src/Xanthous/Command.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Xanthous/Command.hs b/src/Xanthous/Command.hs
index 50fe4abb4561..10fa552b342f 100644
--- a/src/Xanthous/Command.hs
+++ b/src/Xanthous/Command.hs
@@ -8,8 +8,8 @@ import Xanthous.Data (Direction(..))
 data Command
   = Quit
   | Move Direction
-  | PickUp
   | PreviousMessage
+  -- | PickUp
 
 commandFromKey :: Key -> [Modifier] -> Maybe Command
 commandFromKey (KChar 'q') [] = Just Quit
@@ -17,4 +17,7 @@ commandFromKey (KChar 'h') [] = Just $ Move Left
 commandFromKey (KChar 'j') [] = Just $ Move Down
 commandFromKey (KChar 'k') [] = Just $ Move Up
 commandFromKey (KChar 'l') [] = Just $ Move Right
+
+commandFromKey (KChar 'p') [MCtrl] = Just PreviousMessage
+
 commandFromKey _ _ = Nothing