'Gets the character on the right of the text cursor.
:param cursor: QTextCursor where the search will start.
:return: The word that is on the right of the text cursor.'

def get_right_word(self, cursor=None):

    if (cursor is None):
        cursor = self._editor.textCursor()
    cursor.movePosition(QTextCursor.WordRight, QTextCursor.KeepAnchor)
    return cursor.selectedText().strip()
