summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-05-18 20:24:29 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-05-18 20:24:29 +0000
commit96e7f33da3078facc504c6c66d42956bc44b2e54 (patch)
treeca4c6e2cabdc24c01120f551081399abfc92baf7 /screen-write.c
parent58908fd8c54a3c8d2878a7c6f9ca566093302f92 (diff)
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 'screen-write.c')
-rw-r--r--screen-write.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/screen-write.c b/screen-write.c
index 1fee190d..60623701 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -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;