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
1 changed files with 11 additions and 0 deletions

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
// ------------------------------------------------------------------------