code: def __select_text_under_cursor_blocks(self, cursor):
          
  
          start_block = self.document().findBlock(cursor.selectionStart()).firstLineNumber()
          end_block = self.document().findBlock(cursor.selectionEnd()).firstLineNumber()
          cursor.setPosition(self.document().findBlockByLineNumber(start_block).position())
          cursor.movePosition(QTextCursor.StartOfLine, QTextCursor.MoveAnchor)
          cursor.movePosition(QTextCursor.Down, QTextCursor.KeepAnchor, end_block - start_block)
          cursor.movePosition(QTextCursor.EndOfLine, QTextCursor.KeepAnchor)
docs: Selects the document text under cursor blocks.
  
          :param cursor: Cursor.
          :type cursor: QTextCursor