Merge branch 'master' of git.timshomepage.net:tutorials/php-kilo

This commit is contained in:
Timothy Warren 2019-10-22 12:09:21 -04:00
commit deaed33b90

View File

@ -348,6 +348,17 @@ class Editor {
} }
} }
protected function rowInsertChar(Row $row, int $at, string $c)
{
if ($at < 0 || $at > $row->size)
{
$at = $row->size;
}
$row->chars[$at] = $c;
$this->updateRow($row);
}
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// ! File I/O // ! File I/O
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------