Feature - color rules for partial project names

- The color.project.foo colorization rules now matches on partial
  project names (like foobar), matching the functionality of filters.
This commit is contained in:
Paul Beckingham 2009-12-27 13:46:55 -05:00
parent 167b9aa8eb
commit 79113668cd
2 changed files with 5 additions and 2 deletions

View file

@ -109,8 +109,9 @@ void autoColorize (Task& task, Color& c)
{
if (it->first.substr (0, 14) == "color.project.")
{
std::string value = it->first.substr (14);
if (task.get ("project") == value)
std::string value = lowerCase (it->first.substr (14));
std::string project = lowerCase (task.get ("project"));
if (project.find (value) == 0)
c.blend (it->second);
}
}