From 3e305a3ed42aa877c09aa63bad55f0b057547d47 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sun, 10 Jun 2007 13:19:31 +0200 Subject: tag visibles with darcs-hash:20070610111931-9c5c1-1c84455b8b8b6560d9835cfccd9403e3e1b703e9.gz --- DynamicLog.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'DynamicLog.hs') diff --git a/DynamicLog.hs b/DynamicLog.hs index 48e4fff..cc49c34 100644 --- a/DynamicLog.hs +++ b/DynamicLog.hs @@ -40,10 +40,12 @@ dynamicLog = withWindowSet $ io . putStrLn . ppr where ppr s = concatMap fmt $ sortBy tags (map S.workspace (S.current s : S.visible s) ++ S.hidden s) - where tags a b = S.tag a `compare` S.tag b this = S.tag (S.workspace (S.current s)) pprTag = show . (+(1::Int)) . fromIntegral . S.tag - fmt w | S.tag w == this = "[" ++ pprTag w ++ "]" - | S.stack w /= S.Empty = " " ++ pprTag w ++ " " - | otherwise = "" + visibles = map (S.tag . S.workspace) (S.visible s) + + fmt w | S.tag w == this = "[" ++ pprTag w ++ "]" + | S.tag w `elem` visibles = "<" ++ pprTag w ++ ">" + | S.stack w /= S.Empty = " " ++ pprTag w ++ " " + | otherwise = "" -- cgit v1.2.3