def METHOD_NAME(self, position, removed, added):
    """Called if the document changes."""
    if (self.document().findBlock(position).blockNumber() < _LINES or
        self.document().findBlock(position + added).blockNumber() > self.document().blockCount() - _LINES):
        self._updateTimer.start(500)