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. --- tty.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tty.c') diff --git a/tty.c b/tty.c index d215c0d0..56747c8a 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.203 2011-02-15 15:24:00 tcunha Exp $ */ +/* $Id: tty.c,v 1.204 2011-03-19 23:30:37 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -931,6 +931,16 @@ tty_cmd_utf8character(struct tty *tty, const struct tty_ctx *ctx) tty_draw_line(tty, wp->screen, ctx->ocy, wp->xoff, wp->yoff); } +void +tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx) +{ + u_int i; + u_char *str = ctx->ptr; + + for (i = 0; i < ctx->num; i++) + tty_putc(tty, str[i]); +} + void tty_cell( struct tty *tty, const struct grid_cell *gc, const struct grid_utf8 *gu) -- cgit