--- rxvt-unicode/src/screen.C 2011/02/12 00:50:04 1.374 +++ rxvt-unicode/src/screen.C 2011/03/24 23:55:31 1.378 @@ -3,7 +3,7 @@ *---------------------------------------------------------------------------* * * Copyright (c) 1997-2001 Geoff Wing - * Copyright (c) 2003-2007 Marc Lehmann + * Copyright (c) 2003-2007 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2742,32 +2742,12 @@ * will auto fallback to CUT_BUFFER0 * EXT: button 2 release */ - -static void -selection_cb (char *data, unsigned int len, rxvt_selection *rs) -{ - rxvt_term *term = (rxvt_term *)rs->user_data; - - if (data) - term->paste (data, len); - delete rs; - term->selection_req = 0; -} - void rxvt_term::selection_request (Time tm, int selnum) NOTHROW { - if (selection.text && selnum == Sel_Primary) - { - /* internal selection */ - char *str = rxvt_wcstombs (selection.text, selection.len); - paste (str, strlen (str)); - free (str); - return; - } - else if (!selection_req) + if (!selection_req) { - selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], selection_cb, this); + selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], this); selection_req->run (); } }