diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-06-29T00·00-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-06-29T00·00+0000 |
commit | e2273389d579da1666e08f30ef40883a4165bb44 (patch) | |
tree | 0ae82fb1858c562efa88cdc069e45291c63f10b5 /users | |
parent | 90bfbb16672f093c45eb9043252e7964216ff0ab (diff) |
feat(xan): Any user input cancels autocommands r/1116
This is quite straightforward - any time the user presses a key that resolves to a command, cancel any active autocommands. Change-Id: Ibb48b0281b0dc6536d75c8957f8c8e5533ff6630 Reviewed-on: https://cl.tvl.fyi/c/depot/+/731 Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users')
-rw-r--r-- | users/glittershark/xanthous/src/Xanthous/App.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/users/glittershark/xanthous/src/Xanthous/App.hs b/users/glittershark/xanthous/src/Xanthous/App.hs index e20c5d97b854..b43711925c29 100644 --- a/users/glittershark/xanthous/src/Xanthous/App.hs +++ b/users/glittershark/xanthous/src/Xanthous/App.hs @@ -112,6 +112,7 @@ handleNoPromptEvent :: BrickEvent ResourceName AppEvent -> AppM (Next GameState) handleNoPromptEvent (VtyEvent (EvKey k mods)) | Just command <- commandFromKey k mods = do messageHistory %= nextTurn + cancelAutocommand handleCommand command handleNoPromptEvent (AppEvent AutoContinue) = do preuse (autocommand . _ActiveAutocommand . _1) >>= traverse_ autoStep |