diff options
Diffstat (limited to 'users/grfn/xanthous/src/Xanthous/Game/Prompt.hs')
-rw-r--r-- | users/grfn/xanthous/src/Xanthous/Game/Prompt.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/users/grfn/xanthous/src/Xanthous/Game/Prompt.hs b/users/grfn/xanthous/src/Xanthous/Game/Prompt.hs index 30b5fe7545e0..fa4c3903deb1 100644 --- a/users/grfn/xanthous/src/Xanthous/Game/Prompt.hs +++ b/users/grfn/xanthous/src/Xanthous/Game/Prompt.hs @@ -28,7 +28,8 @@ import Brick.Widgets.Edit (Editor, editorText, getEditContents) import Test.QuickCheck import Test.QuickCheck.Arbitrary.Generic -------------------------------------------------------------------------------- -import Xanthous.Util (smallestNotIn) +-------------------------------------------------------------------------------- +import Xanthous.Util (smallestNotIn, AlphaChar (..)) import Xanthous.Data (Direction, Position) import Xanthous.Data.App (ResourceName) import qualified Xanthous.Data.App as Resource @@ -175,7 +176,7 @@ mkMenuItems :: (MonoFoldable f, Element f ~ (Char, MenuOption a)) -> Map Char (MenuOption a) mkMenuItems = flip foldl' mempty $ \items (chr, option) -> let chr' = if has (ix chr) items - then smallestNotIn $ keys items + then getAlphaChar . smallestNotIn . map AlphaChar $ keys items else chr in items & at chr' ?~ option |