'Move the cursor to the input line if not already there. If the cursor
if already in the input line (at position greater or equal to
`newPromptPos`) it is left unchanged, otherwise it is moved at the
end.'

def _moveCursorToInputLine(self):

    cursor = self.textCursor()
    pos = cursor.position()
    if (pos < self.newPromptPos):
        cursor.movePosition(QTextCursor.End)
        self.setTextCursor(cursor)
