From a0295b4c2f648c008b732f7981304ae6e2df322b Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sat, 19 Mar 2011 23:30:37 +0000 Subject: Sync OpenBSD patchset 866: Support passing through escape sequences to the underlying terminal by using DCS with a "tmux;" prefix. Escape characters in the sequences must be doubled. For example: $ printf '\033Ptmux;\033\033]12;red\007\033\\' Will pass \033]12;red\007 to the terminal (and change the cursor colour in xterm). From Kevin Goodsell. --- screen-write.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'screen-write.c') diff --git a/screen-write.c b/screen-write.c index 99ff97bc..4d8595df 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1,4 +1,4 @@ -/* $Id: screen-write.c,v 1.93 2011-02-15 15:10:47 tcunha Exp $ */ +/* $Id: screen-write.c,v 1.94 2011-03-19 23:30:37 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1191,3 +1191,15 @@ screen_write_overwrite(struct screen_write_ctx *ctx, u_int width) grid_view_set_cell(gd, xx, s->cy, &grid_default_cell); } } + +void +screen_write_rawstring(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_rawstring, &ttyctx); +} -- cgit