mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
- Fixed Table::calculateColumnWidths bug.
This commit is contained in:
parent
ab0a57ec89
commit
45a25ca47b
7 changed files with 366 additions and 59 deletions
12
src/text.cpp
12
src/text.cpp
|
@ -183,8 +183,16 @@ void extractLine (std::string& text, std::string& line, int length)
|
|||
// If no space was found, hyphenate.
|
||||
else
|
||||
{
|
||||
line = text.substr (0, length - 1) + "-";
|
||||
text = text.substr (length - 1, std::string::npos);
|
||||
if (length > 1)
|
||||
{
|
||||
line = text.substr (0, length - 1) + "-";
|
||||
text = text.substr (length - 1, std::string::npos);
|
||||
}
|
||||
else
|
||||
{
|
||||
line = text.substr (0, 1);
|
||||
text = text.substr (length, std::string::npos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue