[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 15:13:24 UTC 2010


The following commit has been merged in the master branch:
commit dcf5c5b9edd5a0637ccf42e507aaa33e7ef4ac0c
Author: John Goerzen <jgoerzen at complete.org>
Date:   Thu Nov 23 01:27:25 2006 +0100

    Work on StatusBar

diff --git a/MissingH/StatusBar.hs b/MissingH/StatusBar.hs
index 2050923..0b69d95 100644
--- a/MissingH/StatusBar.hs
+++ b/MissingH/StatusBar.hs
@@ -66,7 +66,10 @@ renderStatus r = withMVar r $ \status ->
                             x -> x ++ " "
        rightpart <- renderoverall (renderer status) (masterP status)
        let leftpart = overallpct ++ componentstr
-       let padwith = (width status) - 1 - (length leftpart) - (length rightpart)
+       let padwidth = (width status) - 1 - (length leftpart) - (length rightpart)
+       if padwidth < 1
+          then return $ leftpart ++ rightpart
+          else return $ leftpart ++ replicate padwidth ' ' ++ rightpart
        
     where renderpct pt = 
               withStatus pt renderpctpts

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list