diff --git a/src/Document.php b/src/Document.php index 2c8cf91..2d5fbc6 100644 --- a/src/Document.php +++ b/src/Document.php @@ -78,6 +78,12 @@ class Document { $this->dirty = false; $this->selectSyntaxHighlight(); + // Add a row to empty files so it can be properly edited + if ($this->isEmpty()) + { + $this->rows[] = Row::new($this, "", 0); + } + return $this; }