Workaround for weird bug.

For unknown reason, some text files were getting an event in void
TextEntryPanel::onTextModified(wxStyledTextEvent& e) when opened,
despite the complete lack of any actual modification. Checking for
non-emptiness of the undo buffer prevents these ghost events from
mattering, but doesn't prevent them from happening.