Improve tail line, fix edit box

* Edit box now supports the usual keys; left/right plus home/end, and does
  the appropriate scrolling.
* Tail line is now a top bar.
* Added option to toggle tail bar, but not bound to any key.
This commit is contained in:
2024-10-03 17:57:41 +02:00
parent 466406733d
commit 19ba6a9bee
4 changed files with 96 additions and 15 deletions

View File

@@ -115,6 +115,12 @@ class Terminal
} elseif (strncmp($this->inputBuffer, "\e[D", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{LEFT}";
} elseif (strncmp($this->inputBuffer, "\e[H", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{HOME}";
} elseif (strncmp($this->inputBuffer, "\e[F", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{END}";
} elseif (strncmp($this->inputBuffer, "\e[5~", 4) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 4);
return "k{PGUP}";