@register(u'kill-line')
def kill_line(event):
 buff = event.current_buffer
 if (event.arg < 0):
  deleted = buff.delete_before_cursor(count=(- buff.document.get_start_of_line_position()))
 elif (buff.document.current_char == u'\n'):
  deleted = buff.delete(1)
 else:
  deleted = buff.delete(count=buff.document.get_end_of_line_position())
 event.cli.clipboard.set_text(deleted)

@ register ( u'kill-line' ) def kill_line ( event ) : buff = event . current_buffer if ( event . arg < 0 ) : deleted = buff . delete_before_cursor ( count = ( - buff . document . get_start_of_line_position ( ) ) ) elif ( buff . document . current_char == u'\n' ) : deleted = buff . delete ( 1 ) else : deleted = buff . delete ( count = buff . document . get_end_of_line_position ( ) ) event . cli . clipboard . set_text ( deleted )
kill the text from the cursor to the end of the line .