CmdReportDay: Added an indicator that the interval is open

This commit is contained in:
Paul Beckingham 2016-04-24 12:57:03 -04:00
parent 0714499fae
commit f4271614d5

View file

@ -151,7 +151,8 @@ int CmdReportDay (
}
auto width = end_offset - start_offset;
if (width)
{
std::vector <std::string> lines;
wrapText (lines, label, width, false);
@ -167,6 +168,20 @@ int CmdReportDay (
line1.add (label1, start_offset, colorTrack);
line2.add (label2, start_offset, colorTrack);
// An open interval gets a "..." in the bottom right corner, or
// whatever fits.
if (! track.range.ended ())
{
int space = 3;
if (width < 3)
space = width;
line2.add (std::string (space, '.'),
width - space,
colorTrack);
}
}
}
std::cout << indent << line1.str () << '\n'