Bugfixes, tweak colors

This commit is contained in:
Chris 2024-10-01 23:01:26 +02:00
parent 9ca53df0ec
commit 53b9ae84a0
2 changed files with 6 additions and 6 deletions

View File

@ -233,11 +233,11 @@ class Editor
$this->term->setCursor(1, $h);
if (!file_exists($readFrom)) {
echo "\e[97;41mFile does not exist\e[K\e[0m";
break;
return;
}
if (!is_readable($readFrom)) {
echo "\e[97;41mFile not readable\e[K\e[0m";
break;
return;
}
$ext = strtolower(pathinfo($readFrom, PATHINFO_EXTENSION));
switch ($ext) {
@ -250,7 +250,7 @@ class Editor
break;
default:
echo "\e[97;41mUnable to read format: {$ext}\e[K\e[0m";
break(2);
return;
}
$this->filename = $readFrom;
@ -478,7 +478,7 @@ class Editor
$node = $this->list->getNodeForIndex($this->currentRow);
$this->term->setCursor(1, $h-1);
echo "\e[44;37m\e[K\e[1m{$this->shortfilename}\e[22m#\e[3m{$path}\e[37;23m";
echo "\e[40;37m\e[K\e[1m{$this->shortfilename}\e[22m#\e[3m{$path}\e[37;23m";
//$this->term->setCursor(1, $h);
echo " = ";

View File

@ -128,7 +128,7 @@ class TreeList implements Countable
$keys = array_keys($this->list);
echo "\e[{$screenRow};1H";
if ($entryRow >= count($keys)) {
echo ($selected?"\e[100;97m":"\e[0;90m")."\e[K";
echo ($selected?"\e[44;97m":"\e[0;90m")."\e[K";
if ($entryRow == count($keys)) echo str_repeat("\u{2574}",$columns);
echo "\e[0m";
//else echo "\e[90m\u{2805}\e[0m";
@ -145,7 +145,7 @@ class TreeList implements Countable
return;
}
echo "\e[{$screenRow};1H\e[0m";
echo ($selected?"\e[100;97m":"\e[0;37m")."\e[K";
echo ($selected?"\e[44;97m":"\e[0;37m")."\e[K";
echo "\e[90m".str_repeat("\u{258f} ",$entry->depth)."\e[37m";
if ($entry->closer) {