Make digits red

This commit is contained in:
Timothy Warren 2019-10-23 13:36:16 -04:00
parent bb1ee20964
commit 83168301ce

View File

@ -660,7 +660,21 @@ class Editor {
$len = $this->screenCols;
}
$this->ab .= substr($this->rows[$filerow]->render, $this->colOffset, $len);
$c = substr($this->rows[$filerow]->render, $this->colOffset, $len);
for ($i = 0; $i < $len; $i++)
{
if (isdigit($c[$i]))
{
$this->ab .= "\x1b[31m";
$this->ab .= $c[$i];
$this->ab .= "\x1b[39m";
}
else
{
$this->ab .= $c[$i];
}
}
}
$this->ab .= "\x1b[K"; // Clear the current line