def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def update_on():
  global _updating
  if not '_updating' in globals(): _updating = False
  if _updating: return