=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.90 retrieving revision 1.91 diff -c -r1.90 -r1.91 *** src/usr.bin/tmux/window-copy.c 2013/03/25 11:43:01 1.90 --- src/usr.bin/tmux/window-copy.c 2013/03/25 11:43:33 1.91 *************** *** 1,4 **** ! /* $OpenBSD: window-copy.c,v 1.90 2013/03/25 11:43:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window-copy.c,v 1.91 2013/03/25 11:43:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1385,1394 **** void window_copy_copy_buffer(struct window_pane *wp, int idx, void *buf, size_t len) { ! u_int limit; ! if (options_get_number(&global_options, "set-clipboard")) ! screen_write_setselection(&wp->ictx.ctx, buf, len); if (idx == -1) { limit = options_get_number(&global_options, "buffer-limit"); --- 1385,1398 ---- void window_copy_copy_buffer(struct window_pane *wp, int idx, void *buf, size_t len) { ! u_int limit; ! struct screen_write_ctx ctx; ! if (options_get_number(&global_options, "set-clipboard")) { ! screen_write_start(&ctx, wp, NULL); ! screen_write_setselection(&ctx, buf, len); ! screen_write_stop(&ctx); ! } if (idx == -1) { limit = options_get_number(&global_options, "buffer-limit");