Complete step 176
This commit is contained in:
parent
2bc98b0308
commit
e6dc670c1d
@ -528,7 +528,21 @@ class Editor {
|
||||
|
||||
for ($i = 0; $i < $len; $i++)
|
||||
{
|
||||
if ($hl[$i] === Highlight::NORMAL)
|
||||
// Handle 'non-printable' characters
|
||||
if (is_cntrl($c[$i]))
|
||||
{
|
||||
$sym = (ord($c[$i]) <= 26)
|
||||
? chr(ord('@') + ord($c[$i]))
|
||||
: '?';
|
||||
$this->ab .= "\x1b[7m";
|
||||
$this->ab .= $sym;
|
||||
$this->ab .= "\x1b[m";
|
||||
if ($currentColor !== -1)
|
||||
{
|
||||
$this->ab .= sprintf("\x1b%dm", $currentColor);
|
||||
}
|
||||
}
|
||||
else if ($hl[$i] === Highlight::NORMAL)
|
||||
{
|
||||
if ($currentColor !== -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user