Misc updates

This commit is contained in:
Timothy Warren 2019-11-05 13:51:21 -05:00
parent f55a603031
commit 155340df66
3 changed files with 5 additions and 2 deletions

2
kilo
View File

@ -6,7 +6,7 @@ namespace Kilo;
// -----------------------------------------------------------------------------
// ! App Constants
// -----------------------------------------------------------------------------
define('KILO_VERSION', '0.0.1');
define('KILO_VERSION', '0.1.0');
define('KILO_TAB_STOP', 4);
define('KILO_QUIT_TIMES', 3);

View File

@ -536,7 +536,7 @@ class Editor {
$filerow = $y + $this->rowOffset;
if ($filerow >= $this->numRows)
{
if ($this->numRows === 0 && $y === $this->screenRows / 3)
if ($this->numRows === 0 && $y === (int)($this->screenRows / 2))
{
$welcome = sprintf('PHP Kilo editor -- version %s', KILO_VERSION);
$welcomelen = strlen($welcome);

View File

@ -244,6 +244,9 @@ class Row {
{
$idx = 0;
// Make sure the render buffer is empty before updating
// otherwise, you will have persistent output where you
// don't want it.
$this->render = '';
for ($i = 0; $i < $this->size; $i++)