From 198902821c4fcb487450c07aca5f31908f2c2093 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 21 May 2016 16:18:52 -0500 Subject: [PATCH] CmdChart: Corrected indentation for multi-line output --- src/commands/CmdChart.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdChart.cpp b/src/commands/CmdChart.cpp index 2ebccaf3..1199a39c 100644 --- a/src/commands/CmdChart.cpp +++ b/src/commands/CmdChart.cpp @@ -156,10 +156,15 @@ int renderChart ( << labelDay << lines[0].str (); + int indent = (rules.getBoolean ("reports." + type + ".month") ? 4 : 0) + + (rules.getBoolean ("reports." + type + ".week") ? 4 : 0) + + (rules.getBoolean ("reports." + type + ".day") ? 3 : 0) + + (rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0); + if (lines.size () > 1) for (unsigned int i = 1; i < lines.size (); ++i) std::cout << "\n" - << std::string (labelMonth.length () + labelDay.length (), ' ') + << std::string (indent, ' ') << lines[i].str (); std::cout << " "