mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
TW-1534
- TW-1534 Urgency coefficient for user project disables 'info' output(thanks to Martin). - Reimplemented 'information' command urgency details as a ViewText. - Fixed math bug in rightJustify.
This commit is contained in:
parent
5911286218
commit
ec919a8677
5 changed files with 107 additions and 73 deletions
|
@ -985,7 +985,11 @@ std::string rightJustify (const int input, const int width)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string rightJustify (const std::string& input, const int width)
|
||||
{
|
||||
return std::string (width - utf8_text_width (input), ' ') + input;
|
||||
unsigned int len = utf8_text_width (input);
|
||||
return ((width > len)
|
||||
? std::string (width - len, ' ')
|
||||
: "")
|
||||
+ input;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue