Fix the use case of editing a zero file
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
This commit is contained in:
parent
8cb783ed2f
commit
223371fb4a
@ -78,6 +78,12 @@ class Document {
|
|||||||
$this->dirty = false;
|
$this->dirty = false;
|
||||||
$this->selectSyntaxHighlight();
|
$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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user