diff --git a/src/Editor.php b/src/Editor.php index e3849d7..8b28b46 100644 --- a/src/Editor.php +++ b/src/Editor.php @@ -250,6 +250,17 @@ class Editor { $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 // ------------------------------------------------------------------------