about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-12-23T03·42-0500
committerGriffin Smith <root@gws.fyi>2019-12-23T03·42-0500
commit0f754eb2a07062e8490ae3af04e7c7ff4d94cc55 (patch)
tree39e01c04d0aeaf2dcee0be4c2355cf93b6389a38
parente619dcd126242c2dc290cc77b2fda0873ced947a (diff)
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.
-rw-r--r--src/Xanthous/Game/Draw.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xanthous/Game/Draw.hs b/src/Xanthous/Game/Draw.hs
index 7947c6efe917..e2390c47bf15 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) ->