<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def kill_cursor(self, cursor):
 """ Kills the text selected by the give cursor. """

        text = cursor.selectedText()
        if text:
            cursor.removeSelectedText()
            self.kill(text)