mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug #1189
- Fixed bug #1189, which caused wide Asian UTF8 characters to be measured as narrow characters (thanks to Roy Zuo).
This commit is contained in:
parent
914447c885
commit
6aa0277749
10 changed files with 45 additions and 36 deletions
|
@ -1049,7 +1049,7 @@ std::string leftJustify (const int input, const int width)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string leftJustify (const std::string& input, const int width)
|
||||
{
|
||||
return input + std::string (width - utf8_text_length (input), ' ');
|
||||
return input + std::string (width - utf8_text_width (input), ' ');
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1071,7 +1071,7 @@ 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_length (input), ' ') + input;
|
||||
return std::string (width - utf8_text_width (input), ' ') + input;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue