From 0f754eb2a07062e8490ae3af04e7c7ff4d94cc55 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 22 Dec 2019 22:42:05 -0500 Subject: [PATCH] Fix rendering string prompts Rendering an editor with txtWrap makes brick blow up because editors have an internal viewport, but txtWrap advertises an infinite width. --- src/Xanthous/Game/Draw.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xanthous/Game/Draw.hs b/src/Xanthous/Game/Draw.hs index 7947c6efe..e2390c47b 100644 --- a/src/Xanthous/Game/Draw.hs +++ b/src/Xanthous/Game/Draw.hs @@ -48,7 +48,7 @@ drawPromptState NoPrompt = emptyWidget drawPromptState (WaitingPrompt msg (Prompt _ pt ps pri _)) = case (pt, ps, pri) of (SStringPrompt, StringPromptState edit, _) -> - txtWrap msg <+> renderEditor (txtWrap . fold) True edit + txtWrap msg <+> txt " " <+> renderEditor (txt . fold) True edit (SDirectionPrompt, DirectionPromptState, _) -> txtWrap msg (SContinue, _, _) -> txtWrap msg (SMenu, _, menuItems) ->