fix(gs/xanthous): Don't take up half-width for prompts

txtWrap takes up half the available width in the viewport, causing
the input for prompts to display way too far to the right of the actual
prompt. I'm not aware of any actual mutiline prompts, so using txt here
makes way more sense.

Change-Id: I7f62066f1b07b5d6ba2c7ffed77c87ae33b1dfa5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3814
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2021-11-07 20:15:07 -05:00 committed by grfn
parent 63524745c9
commit 56718d14b1

View file

@ -44,10 +44,8 @@ drawPromptState NoPrompt = emptyWidget
drawPromptState (WaitingPrompt msg (Prompt _ pt ps pri _)) = drawPromptState (WaitingPrompt msg (Prompt _ pt ps pri _)) =
case (pt, ps, pri) of case (pt, ps, pri) of
(SStringPrompt, StringPromptState edit, mDef) -> (SStringPrompt, StringPromptState edit, mDef) ->
txtWrap msg txt msg
<+> txt " "
<+> txt (maybe "" (\def -> "(default: " <> def <> ") ") mDef) <+> txt (maybe "" (\def -> "(default: " <> def <> ") ") mDef)
<+> txt " "
<+> renderEditor (txt . fold) True edit <+> renderEditor (txt . fold) True edit
(SDirectionPrompt, DirectionPromptState, _) -> txtWrap msg (SDirectionPrompt, DirectionPromptState, _) -> txtWrap msg
(SMenu, _, menuItems) -> (SMenu, _, menuItems) ->