Disable commenting when the text is empty.

Without this, if a user tries to comment a line when the text is empty,
an exception is thrown.

This should have been included in #579.
Merge pull request #581 from agouge/empty-file-comment-exception

Disable commenting when the text is empty