def rotate(self):
if self._prev_yank:<EOL><INDENT>text = self._ring.rotate()<EOL>if text:<EOL><INDENT>self._skip_cursor = True<EOL>cursor = self._text_edit.textCursor()<EOL>cursor.movePosition(QtGui.QTextCursor.Left,<EOL>QtGui.QTextCursor.KeepAnchor,<EOL>n = len(self._prev_yank))<EOL>cursor.insertText(text)<EOL>self._prev_yank = text<EOL><DEDENT><DEDENT>
Rotate the kill ring, then yank back the new top.