Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/columns/ColDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void ColumnDescription::render(std::vector<std::string>& lines, Task& task, int
else if (_style == "truncated") {
int len = utf8_width(description);
if (len > width)
renderStringLeft(lines, width, color, description.substr(0, width - 3) + "...");
renderStringLeft(lines, width, color, utf8_truncate_to_width(description, width - 3) + "...");
else
renderStringLeft(lines, width, color, description);
}
Expand Down Expand Up @@ -207,7 +207,7 @@ void ColumnDescription::render(std::vector<std::string>& lines, Task& task, int

if (len > width)
renderStringLeft(lines, width, color,
description.substr(0, width - len_annos - 3) + "..." + annos_count);
utf8_truncate_to_width(description, width - len_annos - 3) + "..." + annos_count);
else
renderStringLeft(lines, width, color, description + annos_count);
}
Expand Down
Loading