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:
@@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user