mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Obfuscation: rc.obfuscate=1 hides private details
This commit is contained in:
parent
c34b2b8cfb
commit
5d60f426a8
5 changed files with 45 additions and 0 deletions
|
@ -114,6 +114,8 @@ void ViewText::set (int row, int col, Color color)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string ViewText::render ()
|
||||
{
|
||||
bool const obfuscate = context.config.getBoolean ("obfuscate");
|
||||
|
||||
// Determine minimal, ideal column widths.
|
||||
std::vector <int> minimal;
|
||||
std::vector <int> ideal;
|
||||
|
@ -265,6 +267,10 @@ std::string ViewText::render ()
|
|||
|
||||
if (cells[col].size () > max_lines)
|
||||
max_lines = cells[col].size ();
|
||||
|
||||
if (obfuscate)
|
||||
for (unsigned int line = 0; line < cells[col].size (); ++line)
|
||||
cells[col][line] = obfuscateText (cells[col][line]);
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < max_lines; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue