From cad37b7dcebb322e4b8bb30b9eeb18cb4ffa5d08 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 13 Apr 2014 11:06:51 -0700 Subject: [PATCH] balance: fix excessive indent in multicolumn tree mode --- hledger/Hledger/Cli/Balance.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger/Hledger/Cli/Balance.hs b/hledger/Hledger/Cli/Balance.hs index ea2923286..1dfe63519 100644 --- a/hledger/Hledger/Cli/Balance.hs +++ b/hledger/Hledger/Cli/Balance.hs @@ -387,7 +387,7 @@ periodBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltotals)) | otherwise = items -- dbg "2" $ filter (any (not . isZeroMixedAmount) . snd) $ dbg "1" items accts = map renderacct items' renderacct ((a,a',i),_) - | tree_ opts = replicate (i*2) ' ' ++ a' + | tree_ opts = replicate ((i-1)*2) ' ' ++ a' | otherwise = accountNameDrop (drop_ opts) a acctswidth = maximum $ map length $ accts totalrow | no_total_ opts = row "" [] @@ -408,7 +408,7 @@ cumulativeBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltota trimborder = ("":) . (++[""]) . drop 1 . init . map (drop 1 . init) accts = map renderacct items renderacct ((a,a',i),_) - | tree_ opts = replicate (i*2) ' ' ++ a' + | tree_ opts = replicate ((i-1)*2) ' ' ++ a' | otherwise = accountNameDrop (drop_ opts) a acctswidth = maximum $ map length $ accts addtotalrow | no_total_ opts = id @@ -429,7 +429,7 @@ historicalBalanceReportAsText opts (MultiBalanceReport (colspans, items, coltota trimborder = ("":) . (++[""]) . drop 1 . init . map (drop 1 . init) accts = map renderacct items renderacct ((a,a',i),_) - | tree_ opts = replicate (i*2) ' ' ++ a' + | tree_ opts = replicate ((i-1)*2) ' ' ++ a' | otherwise = accountNameDrop (drop_ opts) a acctswidth = maximum $ map length $ accts addtotalrow | no_total_ opts = id