From 89f35125b4eb5c032f57e8acb70274b77e887f0b Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 22 May 2011 16:23:07 +0000 Subject: Sync OpenBSD patchset 914: Support setting the xterm clipboard when copying from copy mode using the xterm escape sequence for the purpose (if xterm is configured to allow it). Written by and much discussed Ailin Nemui, guidance on xterm/termcap/terminfo from Thomas Dickey. --- window-copy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'window-copy.c') diff --git a/window-copy.c b/window-copy.c index c3b8fd04..5c734af9 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.132 2011-05-18 20:35:36 tcunha Exp $ */ +/* $Id: window-copy.c,v 1.133 2011-05-22 16:23:07 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1345,6 +1345,9 @@ window_copy_copy_selection(struct window_pane *wp) } off--; /* remove final \n */ + if (options_get_number(&global_options, "set-clipboard")) + screen_write_setselection(&wp->ictx.ctx, buf, off); + /* Add the buffer to the stack. */ limit = options_get_number(&global_options, "buffer-limit"); paste_add(&global_buffers, buf, off, limit); -- cgit