def duplicate_lines(self):
        """
        Duplicates the document lines under cursor.

        :return: Method success.
        :rtype: bool
        """

        cursor = self.textCursor()
        self.__select_text_under_cursor_blocks(cursor)
        text = cursor.selectedText()

        cursor.setPosition(cursor.block().next().position())
        cursor.position() == cursor.document().firstBlock().position() and cursor.setPosition(
            cursor.document().lastBlock().position())

        start_position = cursor.position()
        cursor.insertText(text)
        end_position = cursor.position()
        cursor.insertText(QChar(QChar.ParagraphSeparator))

        cursor.setPosition(start_position, QTextCursor.MoveAnchor)
        cursor.setPosition(end_position, QTextCursor.KeepAnchor)
        self.setTextCursor(cursor)

        return True
Duplicates the document lines under cursor.

        :return: Method success.
        :rtype: bool