mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdReportDay: Added an indicator that the interval is open
This commit is contained in:
parent
0714499fae
commit
f4271614d5
1 changed files with 28 additions and 13 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue