summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/screen-write.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-05-18 20:24:29 +0000
committernicm <nicm@openbsd.org>2011-05-18 20:24:29 +0000
commitf9bce6b9cd2fb26d160156625097270c582870f9 (patch)
tree00b362c18904218a2edf21da53ffce2bbcfc3cc9 /usr.bin/tmux/screen-write.c
parentsync the alc(4) description; (diff)
downloadwireguard-openbsd-f9bce6b9cd2fb26d160156625097270c582870f9.tar.xz
wireguard-openbsd-f9bce6b9cd2fb26d160156625097270c582870f9.zip
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.
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r--usr.bin/tmux/screen-write.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c
index 1636fd14b59..f6cbe344910 100644
--- a/usr.bin/tmux/screen-write.c
+++ b/usr.bin/tmux/screen-write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen-write.c,v 1.49 2011/04/17 19:21:19 nicm Exp $ */
+/* $OpenBSD: screen-write.c,v 1.50 2011/05/18 20:24:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1195,6 +1195,18 @@ screen_write_overwrite(struct screen_write_ctx *ctx, u_int width)
}
void
+screen_write_setselection(struct screen_write_ctx *ctx, u_char *str, u_int len)
+{
+ struct tty_ctx ttyctx;
+
+ screen_write_initctx(ctx, &ttyctx, 0);
+ ttyctx.ptr = str;
+ ttyctx.num = len;
+
+ tty_write(tty_cmd_setselection, &ttyctx);
+}
+
+void
screen_write_rawstring(struct screen_write_ctx *ctx, u_char *str, u_int len)
{
struct tty_ctx ttyctx;