From ea80ccb6782cc4f9032faa5af9f172a80d89e38e Mon Sep 17 00:00:00 2001 From: Romain Edelmann Date: Tue, 13 Aug 2013 01:15:03 +0200 Subject: [PATCH] Fixed bug: Scat did not respect the --silent flag during code erasure. --- src/Scat.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Scat.hs b/src/Scat.hs index 5542515..bcaf0e2 100644 --- a/src/Scat.hs +++ b/src/Scat.hs @@ -105,7 +105,8 @@ prompt vis str = do (hSetEcho stdin $ shouldShow vis) (hSetEcho stdin old) C.getLine - when (shouldErase vis) $ liftIO $ do + v <- fmap verbose ask + when (shouldErase vis && v) $ liftIO $ do cursorUpLine 1 cursorForward $ length str clearFromCursorToScreenEnd