Permalink
Browse files

fixup! [AD-448] Make TUI display multiline error messages

  • Loading branch information...
rvem committed Dec 6, 2018
1 parent d88817c commit 82df4bc98d9091e8274adb238705ed23e6159c12
Showing with 4 additions and 1 deletion.
  1. +3 −1 ui/vty-app/Glue.hs
  2. +1 −0 ui/vty-app/package.yaml
@@ -31,6 +31,7 @@ import Data.Unique
import qualified Data.Vector as V
import Data.Version (Version)
import NType (AllConstrained, Elem, KnownSpine)
import Text.Wrap (defaultWrapSettings, wrapText)
import qualified Text.PrettyPrint.ANSI.Leijen as PP
import Ariadne.Cardano.Face
@@ -253,7 +254,8 @@ knitCommandResultToUI commandId = Just . UiCommandEvent commandId . \case
KnitCommandProcError e ->
UiCommandFailure $ Knit.ppResolveErrors e
KnitCommandException e ->
UiCommandFailure $ PP.text (displayException e)
UiCommandFailure $ PP.string $
toString $ wrapText defaultWrapSettings 80 (fromString $ displayException e)
knitCommandOutputToUI :: UiCommandId -> PP.Doc -> UiEvent
knitCommandOutputToUI commandId doc = UiCommandEvent commandId (UiCommandOutput doc)
@@ -23,3 +23,4 @@ executables:
- text
- vector
- vinyl
- word-wrap

0 comments on commit 82df4bc

Please sign in to comment.