'Kill the text on the current line from the cursor forward'

def kill_line_end(self):

    cursor = self.textCursor()
    cursor.clearSelection()
    cursor.movePosition(QTextCursor.EndOfLine, QTextCursor.KeepAnchor)
    if (not cursor.hasSelection()):
        cursor.movePosition(QTextCursor.NextBlock, QTextCursor.KeepAnchor)
    self._kill_ring.kill_cursor(cursor)
    self.setTextCursor(cursor)
