From ed0244716182cc2c3a82a31f91832f44de94809f Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Sun, 6 Oct 2024 16:35:54 +0200 Subject: [PATCH] Add support for home/end in editor --- src/Editor/Editor.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Editor/Editor.php b/src/Editor/Editor.php index f76cc95..0c5fc31 100644 --- a/src/Editor/Editor.php +++ b/src/Editor/Editor.php @@ -122,6 +122,14 @@ class Editor $this->currentRow = min(count($this->list), $this->currentRow + ($h - 3)); $this->redrawEditor(); break; + case 'k{HOME}': + $this->currentRow = 0; + $this->redrawEditor(); + break; + case 'k{END}': + $this->currentRow = count($this->list); + $this->redrawEditor(); + break; case 'E': $this->doEditKey(); @@ -552,10 +560,10 @@ class Editor This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - EOT."\n/ Built on: ".APP_BUILDDATE; + EOT."\n/ Version: ".APP_VERSION."\n/ Built at: ".APP_BUILDDATE; $width = 60; - $height = 21; + $height = 22; $left = round(($w / 2) - ($width / 2)); $top = round(($h / 2) - ($height / 2));