Add support for home/end in editor

This commit is contained in:
Chris 2024-10-06 16:35:54 +02:00
parent 10d8c4bfce
commit ed02447161

View File

@ -122,6 +122,14 @@ class Editor
$this->currentRow = min(count($this->list), $this->currentRow + ($h - 3)); $this->currentRow = min(count($this->list), $this->currentRow + ($h - 3));
$this->redrawEditor(); $this->redrawEditor();
break; break;
case 'k{HOME}':
$this->currentRow = 0;
$this->redrawEditor();
break;
case 'k{END}':
$this->currentRow = count($this->list);
$this->redrawEditor();
break;
case 'E': case 'E':
$this->doEditKey(); $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. 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; $width = 60;
$height = 21; $height = 22;
$left = round(($w / 2) - ($width / 2)); $left = round(($w / 2) - ($width / 2));
$top = round(($h / 2) - ($height / 2)); $top = round(($h / 2) - ($height / 2));