Start chapter 5

This commit is contained in:
Timothy Warren 2019-10-21 20:48:32 -04:00
parent e9cdc17322
commit e2d3697279

View File

@ -250,6 +250,17 @@ class Editor {
$this->updateRow($this->rows[$at]); $this->updateRow($this->rows[$at]);
} }
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
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------