-/* $OpenBSD: input.c,v 1.125 2017/06/04 09:22:34 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.126 2017/06/09 09:21:24 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
screen_write_start(&ctx, wp, NULL);
screen_write_setselection(&ctx, out, outlen);
screen_write_stop(&ctx);
+ notify_pane("pane-set-clipboard", wp);
paste_add(out, outlen);
}
-.\" $OpenBSD: tmux.1,v 1.559 2017/06/07 14:37:30 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.560 2017/06/09 09:21:24 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 7 2017 $
+.Dd $Mdocdate: June 9 2017 $
.Dt TMUX 1
.Os
.Sh NAME
.Op Ic on | external | off
.Xc
Attempt to set the terminal clipboard content using the
-\ee]52;...\e007
.Xr xterm 1
-escape sequences, if there is an
+escape sequence, if there is an
.Em \&Ms
entry in the
.Xr terminfo 5
-description.
+description (see the
+.Sx TERMINFO EXTENSIONS
+section).
+.Pp
If set to
.Ic on ,
.Nm
.Ed
.Pp
In addition, the following hooks are available:
-.Bl -tag -width "XXXXXXXXXXXXXXXX"
+.Bl -tag -width "XXXXXXXXXXXXXXXXXXXXXX"
.It alert-activity
Run when a window has activity.
See
is on so the pane has not closed.
.It pane-exited
Run when the program running in a pane exits.
+.It pane-set-clipboard
+Run when the terminal clipboard is set using the
+.Xr xterm 1
+escape sequence.
.It session-created
Run when a new session created.
.It session-closed
-/* $OpenBSD: window-copy.c,v 1.178 2017/06/03 17:43:01 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.179 2017/06/09 09:21:24 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
screen_write_start(&ctx, wp, NULL);
screen_write_setselection(&ctx, buf, len);
screen_write_stop(&ctx);
+ notify_pane("pane-set-clipboard", wp);
}
if (paste_set(buf, len, bufname, NULL) != 0)
screen_write_start(&ctx, wp, NULL);
screen_write_setselection(&ctx, buf, len);
screen_write_stop(&ctx);
+ notify_pane("pane-set-clipboard", wp);
}
if (bufname == NULL || *bufname == '\0')