From e0e9b8f91d0c51294d7d0efe7478339597b6ef12 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 2 Aug 2014 15:24:36 +0000 Subject: use pp instead of show to show pp-d stuff :) --- src/Main.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index ddb5e31..4d8ba5c 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -269,8 +269,8 @@ execCommand ExecuteInputBuffer = do liftIO ringBell s -> do let s' = SGR [32] $ gaudySpecial [1] s - tell [ pp $ "input: <" <> s' <> ">" - , pp $ SGR [35,1] $ Plain $ init $ tail $ show $ pp s' + tell [ pp $ "input: " <> s' + , pp $ SGR [35] $ gaudySpecial [1] $ pp s' ] modifyBuffer (const emptyBuffer) @@ -397,7 +397,9 @@ gaudySpecial c = gaudySpans c (not . isPrint) lit :: String -> String -lit = (>>= flip showLitChar "") +lit = (>>= f) + where f '\ESC' = "^[" + f c = showLitChar c "" clearLine :: IO () -- cgit v1.2.3