code: def kill_cursor(self, cursor):
          
          text = cursor.selectedText()
          if text:
              cursor.removeSelectedText()
              self.kill(text)
docs: Kills the text selected by the give cursor.