diff --git a/src/Editor/Editor.php b/src/Editor/Editor.php index 9ef0a6d..9ef665d 100644 --- a/src/Editor/Editor.php +++ b/src/Editor/Editor.php @@ -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 " = "; diff --git a/src/List/TreeList.php b/src/List/TreeList.php index 86c6be8..d2524d4 100644 --- a/src/List/TreeList.php +++ b/src/List/TreeList.php @@ -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) {