dont remove more lines than exist in the whole text
wrap appendRevision in try-catch block
be more strict in checkRep
Revert "be more strict in checkRep"

This reverts commit 22803da42f4f8c6aeccc15d0a916bae6332a8652.
Merge pull request #2404 from webzwo0i/sanity-in-atext

block changeset if it deletes more lines than exist in the whole pad