docs: def _move_cursor_to_line(self, line):
          """
          Moves the cursor to the specified line, if possible.
          """
          last_line = self._text_edit.document().blockCount() - 1
          self._cursor.clearSelection()
          self._cursor.movePosition(self._cursor.End)
          to_insert = ''
          for i in range(line - last_line):
              to_insert += '\n'
          if to_insert:
              self._cursor.insertText(to_insert)
          self._cursor.movePosition(self._cursor.Start)
          self._cursor.movePosition(self._cursor.Down, self._cursor.MoveAnchor, line)
          self._last_cursor_pos = self._cursor.position()