mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
ColDepends: Now uses ::renderStringLeft
This commit is contained in:
parent
06c50efa63
commit
292e2f1b89
1 changed files with 19 additions and 25 deletions
|
@ -122,37 +122,31 @@ void ColumnDepends::render (
|
||||||
if (task.has (_name))
|
if (task.has (_name))
|
||||||
{
|
{
|
||||||
if (_style == "indicator")
|
if (_style == "indicator")
|
||||||
|
renderStringRight (lines, width, color, context.config.get ("dependency.indicator"));
|
||||||
|
else
|
||||||
{
|
{
|
||||||
lines.push_back (
|
std::vector <Task> blocking;
|
||||||
color.colorize (
|
dependencyGetBlocking (task, blocking);
|
||||||
rightJustify (context.config.get ("dependency.indicator"), width)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector <Task> blocking;
|
if (_style == "count")
|
||||||
dependencyGetBlocking (task, blocking);
|
renderStringRight (lines, width, color, "[" + format (static_cast <int>(blocking.size ())) + "]");
|
||||||
|
|
||||||
if (_style == "count")
|
else if (_style == "default" ||
|
||||||
{
|
_style == "list")
|
||||||
lines.push_back (
|
{
|
||||||
color.colorize (
|
std::vector <int> blocking_ids;
|
||||||
rightJustify ("[" + format ((int)blocking.size ()) + "]", width)));
|
for (auto& t : blocking)
|
||||||
}
|
blocking_ids.push_back (t.id);
|
||||||
else if (_style == "default" ||
|
|
||||||
_style == "list")
|
|
||||||
{
|
|
||||||
std::vector <int> blocking_ids;
|
|
||||||
for (auto& t : blocking)
|
|
||||||
blocking_ids.push_back (t.id);
|
|
||||||
|
|
||||||
std::string combined;
|
std::string combined;
|
||||||
join (combined, " ", blocking_ids);
|
join (combined, " ", blocking_ids);
|
||||||
|
|
||||||
std::vector <std::string> all;
|
std::vector <std::string> all;
|
||||||
wrapText (all, combined, width, _hyphenate);
|
wrapText (all, combined, width, _hyphenate);
|
||||||
|
|
||||||
for (auto& i : all)
|
for (auto& i : all)
|
||||||
lines.push_back (color.colorize (leftJustify (i, width)));
|
renderStringLeft (lines, width, color, i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue