Obfuscation: rc.obfuscate=1 hides private details

This commit is contained in:
Paul Beckingham 2015-04-26 10:31:32 -04:00
parent c34b2b8cfb
commit 5d60f426a8
5 changed files with 45 additions and 0 deletions

View file

@ -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)